summaryrefslogtreecommitdiff
path: root/lib/fcntl.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fcntl.in.h')
-rw-r--r--lib/fcntl.in.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h
index b6521d6719..971316fc05 100644
--- a/lib/fcntl.in.h
+++ b/lib/fcntl.in.h
@@ -256,6 +256,11 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# define O_TTY_INIT 0
#endif
+#if O_ACCMODE != (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
+# undef O_ACCMODE
+# define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
+#endif
+
/* For systems that distinguish between text and binary I/O.
O_BINARY is usually declared in fcntl.h */
#if !defined O_BINARY && defined _O_BINARY