summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/bits/fcntl.h2
-rw-r--r--arch/i386/bits/fcntl.h2
-rw-r--r--arch/mips/bits/fcntl.h2
-rw-r--r--arch/x86_64/bits/fcntl.h2
-rw-r--r--include/fcntl.h2
5 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/bits/fcntl.h b/arch/arm/bits/fcntl.h
index 9595f9ca..7e746026 100644
--- a/arch/arm/bits/fcntl.h
+++ b/arch/arm/bits/fcntl.h
@@ -10,12 +10,14 @@
#define O_DIRECTORY 040000
#define O_NOFOLLOW 0100000
#define O_CLOEXEC 02000000
+#define O_SEARCH 010000000
#define O_ASYNC 020000
#define O_DIRECT 0200000
#define O_LARGEFILE 0400000
#define O_NOATIME 01000000
#define O_NDELAY O_NONBLOCK
+#define O_PATH 010000000
#define F_DUPFD 0
#define F_GETFD 1
diff --git a/arch/i386/bits/fcntl.h b/arch/i386/bits/fcntl.h
index 69f3a8f5..6325a332 100644
--- a/arch/i386/bits/fcntl.h
+++ b/arch/i386/bits/fcntl.h
@@ -10,12 +10,14 @@
#define O_DIRECTORY 0200000
#define O_NOFOLLOW 0400000
#define O_CLOEXEC 02000000
+#define O_SEARCH 010000000
#define O_ASYNC 020000
#define O_DIRECT 040000
#define O_LARGEFILE 0100000
#define O_NOATIME 01000000
#define O_NDELAY O_NONBLOCK
+#define O_PATH 010000000
#define F_DUPFD 0
#define F_GETFD 1
diff --git a/arch/mips/bits/fcntl.h b/arch/mips/bits/fcntl.h
index 6795800d..6f912fb9 100644
--- a/arch/mips/bits/fcntl.h
+++ b/arch/mips/bits/fcntl.h
@@ -14,6 +14,8 @@
#define O_NOFOLLOW 0400000
#define O_NOATIME 01000000
#define O_CLOEXEC 02000000
+#define O_PATH 010000000
+#define O_SEARCH 010000000
#define O_NDELAY O_NONBLOCK
diff --git a/arch/x86_64/bits/fcntl.h b/arch/x86_64/bits/fcntl.h
index 9e07229e..c02b0b53 100644
--- a/arch/x86_64/bits/fcntl.h
+++ b/arch/x86_64/bits/fcntl.h
@@ -10,12 +10,14 @@
#define O_DIRECTORY 0200000
#define O_NOFOLLOW 0400000
#define O_CLOEXEC 02000000
+#define O_SEARCH 010000000
#define O_ASYNC 020000
#define O_DIRECT 040000
#define O_LARGEFILE 0
#define O_NOATIME 01000000
#define O_NDELAY O_NONBLOCK
+#define O_PATH 010000000
#define F_DUPFD 0
#define F_GETFD 1
diff --git a/include/fcntl.h b/include/fcntl.h
index cbaec5da..b06c276f 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -37,7 +37,7 @@ int openat(int, const char *, int, ...);
int posix_fadvise(int, off_t, off_t, int);
int posix_fallocate(int, off_t, off_t);
-#define O_ACCMODE 03
+#define O_ACCMODE (O_RDWR|O_SEARCH)
#define O_RDONLY 00
#define O_WRONLY 01
#define O_RDWR 02