[libc-commits] [PATCH] D119265: [libc][Obvious] Fix typo in mkdir and mkdirat implementations.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Feb 8 10:54:08 PST 2022

sivachandra created this revision.
sivachandra added reviewers: michaelrj, lntue.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added a project: libc-project.
sivachandra requested review of this revision.

  rG LLVM Github Monorepo



Index: libc/src/sys/stat/linux/mkdirat.cpp
--- libc/src/sys/stat/linux/mkdirat.cpp
+++ libc/src/sys/stat/linux/mkdirat.cpp
@@ -18,7 +18,7 @@
 namespace __llvm_libc {
 LLVM_LIBC_FUNCTION(int, mkdirat, (int dfd, const char *path, mode_t mode)) {
-#ifdef SYS_unlinkat
+#ifdef SYS_mkdirat
   long ret = __llvm_libc::syscall(SYS_mkdirat, dfd, path, mode);
 #error "mkdirat syscalls not available."
Index: libc/src/sys/stat/linux/mkdir.cpp
--- libc/src/sys/stat/linux/mkdir.cpp
+++ libc/src/sys/stat/linux/mkdir.cpp
@@ -21,7 +21,7 @@
 LLVM_LIBC_FUNCTION(int, mkdir, (const char *path, mode_t mode)) {
 #ifdef SYS_mkdir
   long ret = __llvm_libc::syscall(SYS_mkdir, path, mode);
-#elif defined(SYS_unlinkat)
+#elif defined(SYS_mkdirat)
   long ret = __llvm_libc::syscall(SYS_mkdirat, AT_FDCWD, path, mode);
 #error "mkdir and mkdirat syscalls not available."

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119265.406897.patch
Type: text/x-patch
Size: 1004 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220208/b093a9f0/attachment-0001.bin>

More information about the libc-commits mailing list