Skip to content

Commit 9e3471a

Browse files
committed
Auto merge of #3122 - valpackett:fbsd, r=JohnTitor
FreeBSD: strchrnul, AT_EMPTY_PATH - one related constant I missed in #3114 - since #3104 landed let's do that too (this function was available since FreeBSD 10)
2 parents e401a59 + b6d5899 commit 9e3471a

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

libc-test/build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2078,7 +2078,9 @@ fn test_freebsd(target: &str) {
20782078
"O_RESOLVE_BENEATH" if Some(12) > freebsd_ver => true,
20792079

20802080
// These constants were introduced in FreeBSD 13:
2081-
"O_DSYNC" | "O_PATH" | "O_EMPTY_PATH" if Some(13) > freebsd_ver => true,
2081+
"O_DSYNC" | "O_PATH" | "O_EMPTY_PATH" | "AT_EMPTY_PATH" if Some(13) > freebsd_ver => {
2082+
true
2083+
}
20822084

20832085
// FIXME: These are deprecated - remove in a couple of releases.
20842086
// These constants were removed in FreeBSD 11 (svn r273250) but will

libc-test/semver/freebsd.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ ATF_USETRAILERS
8686
AT_BASE
8787
AT_EACCESS
8888
AT_EGID
89+
AT_EMPTY_PATH
8990
AT_ENTRY
9091
AT_EUID
9192
AT_EXECPATH
@@ -2109,6 +2110,7 @@ stack_t
21092110
statfs
21102111
strcasecmp
21112112
strcasestr
2113+
strchrnul
21122114
strncasecmp
21132115
strndup
21142116
strsignal

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3737,6 +3737,7 @@ pub const AT_EACCESS: ::c_int = 0x100;
37373737
pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200;
37383738
pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
37393739
pub const AT_REMOVEDIR: ::c_int = 0x800;
3740+
pub const AT_EMPTY_PATH: ::c_int = 0x4000;
37403741

37413742
pub const AT_NULL: ::c_int = 0;
37423743
pub const AT_IGNORE: ::c_int = 1;
@@ -5249,6 +5250,8 @@ extern "C" {
52495250
rmtp: *mut ::timespec,
52505251
) -> ::c_int;
52515252

5253+
pub fn strchrnul(s: *const ::c_char, c: ::c_int) -> *mut ::c_char;
5254+
52525255
pub fn shm_create_largepage(
52535256
path: *const ::c_char,
52545257
flags: ::c_int,

0 commit comments

Comments
 (0)