summaryrefslogtreecommitdiff
path: root/arch/x86_64/bits/fcntl.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-09-13 20:56:25 -0400
committerRich Felker <dalias@aerifal.cx>2012-09-13 20:56:25 -0400
commitb238b37a0f9d12f87dc9b7ce1ece4bcde566a45f (patch)
treeb6cb7b8118f355e77046eb388c2163b1d1d267c6 /arch/x86_64/bits/fcntl.h
parentcfc09b1ecf0c6981494fd73dffe234416f66af10 (diff)
downloadmusl-b238b37a0f9d12f87dc9b7ce1ece4bcde566a45f.tar.gz
musl-b238b37a0f9d12f87dc9b7ce1ece4bcde566a45f.tar.bz2
musl-b238b37a0f9d12f87dc9b7ce1ece4bcde566a45f.tar.xz
musl-b238b37a0f9d12f87dc9b7ce1ece4bcde566a45f.zip
add O_PATH/O_SEARCH support to fcntl.h
I'm not 100% sure that Linux's O_PATH meets the POSIX requirements for O_SEARCH, but it seems very close if not perfect. and old kernels ignore it, so O_SEARCH will still work as desired as long as the caller has read permissions to the directory.
Diffstat (limited to 'arch/x86_64/bits/fcntl.h')
-rw-r--r--arch/x86_64/bits/fcntl.h2
1 files changed, 2 insertions, 0 deletions
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