Skip to content

Commit 196d497

Browse files
committed
Add more FreeBSD-specific path open option constants
1 parent 17adcf2 commit 196d497

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

libc-test/build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2074,6 +2074,12 @@ fn test_freebsd(target: &str) {
20742074
// These constants were introduced in FreeBSD 13:
20752075
"EFD_CLOEXEC" | "EFD_NONBLOCK" | "EFD_SEMAPHORE" if Some(13) > freebsd_ver => true,
20762076

2077+
// This constant was introduced in FreeBSD 12:
2078+
"O_RESOLVE_BENEATH" if Some(12) > freebsd_ver => true,
2079+
2080+
// These constants were introduced in FreeBSD 13:
2081+
"O_DSYNC" | "O_PATH" | "O_EMPTY_PATH" if Some(13) > freebsd_ver => true,
2082+
20772083
// FIXME: These are deprecated - remove in a couple of releases.
20782084
// These constants were removed in FreeBSD 11 (svn r273250) but will
20792085
// still be accepted and ignored at runtime.

libc-test/semver/freebsd.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,14 +819,20 @@ ONOEOT
819819
OXTABS
820820
O_ASYNC
821821
O_DIRECT
822+
O_DSYNC
823+
O_EMPTY_PATH
822824
O_EXEC
823825
O_EXLOCK
824826
O_FSYNC
825827
O_NDELAY
826828
O_NOCTTY
829+
O_PATH
830+
O_RESOLVE_BENEATH
831+
O_SEARCH
827832
O_SHLOCK
828833
O_SYNC
829834
O_TTY_INIT
835+
O_VERIFY
830836
PD_ALLOWED_AT_FORK
831837
PD_CLOEXEC
832838
PD_DAEMON

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2461,8 +2461,14 @@ pub const SF_USER_READAHEAD: ::c_int = 0x00000008;
24612461
pub const SF_NOCACHE: ::c_int = 0x00000010;
24622462
pub const O_CLOEXEC: ::c_int = 0x00100000;
24632463
pub const O_DIRECTORY: ::c_int = 0x00020000;
2464+
pub const O_DSYNC: ::c_int = 0x01000000;
2465+
pub const O_EMPTY_PATH: ::c_int = 0x02000000;
24642466
pub const O_EXEC: ::c_int = 0x00040000;
2467+
pub const O_PATH: ::c_int = 0x00400000;
2468+
pub const O_RESOLVE_BENEATH: ::c_int = 0x00800000;
2469+
pub const O_SEARCH: ::c_int = O_EXEC;
24652470
pub const O_TTY_INIT: ::c_int = 0x00080000;
2471+
pub const O_VERIFY: ::c_int = 0x00200000;
24662472
pub const F_GETLK: ::c_int = 11;
24672473
pub const F_SETLK: ::c_int = 12;
24682474
pub const F_SETLKW: ::c_int = 13;

0 commit comments

Comments
 (0)