diff options
author | Val Packett <val@packett.cool> | 2023-02-18 18:05:00 -0300 |
---|---|---|
committer | Val Packett <val@packett.cool> | 2023-02-18 18:05:00 -0300 |
commit | e8a80dad4e6d3ed85a7a9b166872984e5e94cfe9 (patch) | |
tree | 3cabd2067ec3c177f0c231f75443256a22486c9f | |
parent | e401a59dd35171983545072eb296b1b1ced1b8c1 (diff) | |
download | rust-libc-e8a80dad4e6d3ed85a7a9b166872984e5e94cfe9.tar.gz |
FreeBSD: add AT_EMPTY_PATH
-rw-r--r-- | libc-test/build.rs | 4 | ||||
-rw-r--r-- | libc-test/semver/freebsd.txt | 1 | ||||
-rw-r--r-- | src/unix/bsd/freebsdlike/freebsd/mod.rs | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index ea7db1a503..b11cf1363f 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2078,7 +2078,9 @@ fn test_freebsd(target: &str) { "O_RESOLVE_BENEATH" if Some(12) > freebsd_ver => true, // These constants were introduced in FreeBSD 13: - "O_DSYNC" | "O_PATH" | "O_EMPTY_PATH" if Some(13) > freebsd_ver => true, + "O_DSYNC" | "O_PATH" | "O_EMPTY_PATH" | "AT_EMPTY_PATH" if Some(13) > freebsd_ver => { + true + } // FIXME: These are deprecated - remove in a couple of releases. // These constants were removed in FreeBSD 11 (svn r273250) but will diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index f1ad283e68..52963d6cd3 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -86,6 +86,7 @@ ATF_USETRAILERS AT_BASE AT_EACCESS AT_EGID +AT_EMPTY_PATH AT_ENTRY AT_EUID AT_EXECPATH diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index d1dcf46e10..02a3fbedaf 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -3737,6 +3737,7 @@ pub const AT_EACCESS: ::c_int = 0x100; pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200; pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400; pub const AT_REMOVEDIR: ::c_int = 0x800; +pub const AT_EMPTY_PATH: ::c_int = 0x4000; pub const AT_NULL: ::c_int = 0; pub const AT_IGNORE: ::c_int = 1; |