From 4b747613a527320504ba2017cb2d8891758c6e0d Mon Sep 17 00:00:00 2001 From: Steve Lau Date: Sun, 28 Apr 2024 08:59:27 +0800 Subject: [PATCH] feat: O_EXEC/O_SEARCH for apple platforms --- libc-test/semver/apple.txt | 2 ++ src/unix/bsd/apple/mod.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index 42966b54309c3..e01934bf0ceb3 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -1035,11 +1035,13 @@ OXTABS O_ASYNC O_DSYNC O_EVTONLY +O_EXEC O_EXLOCK O_FSYNC O_NDELAY O_NOCTTY O_NOFOLLOW_ANY +O_SEARCH O_SHLOCK O_SYMLINK O_SYNC diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 74a87eccb165a..d9e3831ea2e1a 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -3252,6 +3252,8 @@ pub const O_SYMLINK: ::c_int = 0x00200000; pub const O_DSYNC: ::c_int = 0x00400000; pub const O_CLOEXEC: ::c_int = 0x01000000; pub const O_NOFOLLOW_ANY: ::c_int = 0x20000000; +pub const O_EXEC: ::c_int = 0x40000000; +pub const O_SEARCH: ::c_int = O_EXEC | O_DIRECTORY; pub const S_IFIFO: mode_t = 4096; pub const S_IFCHR: mode_t = 8192; pub const S_IFBLK: mode_t = 24576;