[libc-commits] [libc] 4c1b441 - [libc] Adjust few fcntl macros for aarch64.

Siva Chandra Reddy via libc-commits libc-commits at lists.llvm.org
Tue Feb 1 00:15:01 PST 2022


Author: Siva Chandra Reddy
Date: 2022-02-01T08:14:32Z
New Revision: 4c1b44160ac2586abfe15219d813f0d9ac049654

URL: https://github.com/llvm/llvm-project/commit/4c1b44160ac2586abfe15219d813f0d9ac049654
DIFF: https://github.com/llvm/llvm-project/commit/4c1b44160ac2586abfe15219d813f0d9ac049654.diff

LOG: [libc] Adjust few fcntl macros for aarch64.

Added: 
    

Modified: 
    libc/include/llvm-libc-macros/linux/fcntl-macros.h

Removed: 
    


################################################################################
diff  --git a/libc/include/llvm-libc-macros/linux/fcntl-macros.h b/libc/include/llvm-libc-macros/linux/fcntl-macros.h
index 46655c2d12eb..48cb5f3ac450 100644
--- a/libc/include/llvm-libc-macros/linux/fcntl-macros.h
+++ b/libc/include/llvm-libc-macros/linux/fcntl-macros.h
@@ -12,10 +12,22 @@
 // File creation flags
 #define O_CLOEXEC 02000000
 #define O_CREAT 00000100
+
+#ifdef __aarch64__
+#define O_DIRECTORY 040000
+#else
 #define O_DIRECTORY 00200000
+#endif
+
 #define O_EXCL 00000200
 #define O_NOCTTY 00000400
+
+#ifdef __aarch64__
+#define O_NOFOLLOW 0100000
+#else
 #define O_NOFOLLOW 00400000
+#endif
+
 #define O_TRUNC 00001000
 #define O_TMPFILE (020000000 | O_DIRECTORY)
 


        


More information about the libc-commits mailing list