summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/nds32/bits
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-06-08 22:22:04 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2017-06-08 22:26:35 +0200
commit197a82dd6d478b98cfe499b31cf6e2cfde682314 (patch)
treef644de1a43e98e51e27bcaf797a655cf8e0129b8 /libc/sysdeps/linux/nds32/bits
parent8976b42181f1f5b47a8fe97ec8a77c0071d0362a (diff)
fcntl.h: fixup namespace for O_DIRECTORY/O_NOFOLLOW/O_CLOEXEC
Sync with GNU C library. Found while trying to compile linux-rdma to uClibc-ng. Reported-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Diffstat (limited to 'libc/sysdeps/linux/nds32/bits')
-rw-r--r--libc/sysdeps/linux/nds32/bits/fcntl.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/nds32/bits/fcntl.h b/libc/sysdeps/linux/nds32/bits/fcntl.h
index a936023aa..fa9f039f5 100644
--- a/libc/sysdeps/linux/nds32/bits/fcntl.h
+++ b/libc/sysdeps/linux/nds32/bits/fcntl.h
@@ -48,12 +48,15 @@
#define O_FSYNC O_SYNC
#define O_ASYNC 020000
-#ifdef __USE_GNU
-# define O_DIRECT 040000 /* Direct disk access. */
+#ifdef __USE_XOPEN2K8
# define O_DIRECTORY 0200000 /* Must be a directory. */
# define O_NOFOLLOW 0400000 /* Do not follow links. */
-# define O_NOATIME 01000000 /* Do not set atime. */
# define O_CLOEXEC 02000000 /* set close_on_exec */
+#endif
+
+#ifdef __USE_GNU
+# define O_DIRECT 040000 /* Direct disk access. */
+# define O_NOATIME 01000000 /* Do not set atime. */
# define O_PATH 010000000 /* Resolve pathname but do not open file. */
#endif