Skip to content

Commit cd875d3

Browse files
committed
Auto merge of #2704 - devnexen:fbsd_libutil_upd, r=Amanieu
adding getlocalbase to freebsd 13
2 parents b9d0049 + 921130a commit cd875d3

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,6 +2344,9 @@ fn test_freebsd(target: &str) {
23442344
// Those were introduced in FreeBSD 12.
23452345
"flopen" | "flopenat" if Some(12) > freebsd_ver => true,
23462346

2347+
// Added in FreeBSD 13.
2348+
"getlocalbase" if Some(13) > freebsd_ver => true,
2349+
23472350
_ => false,
23482351
}
23492352
});

libc-test/semver/freebsd.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,6 +1525,7 @@ getifaddrs
15251525
getitimer
15261526
getline
15271527
getloadavg
1528+
getlocalbase
15281529
getnameinfo
15291530
getpagesize
15301531
getpagesizes

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4326,6 +4326,8 @@ extern "C" {
43264326

43274327
pub fn flopen(path: *const ::c_char, flags: ::c_int, ...) -> ::c_int;
43284328
pub fn flopenat(fd: ::c_int, path: *const ::c_char, flags: ::c_int, ...) -> ::c_int;
4329+
4330+
pub fn getlocalbase() -> *const ::c_char;
43294331
}
43304332

43314333
#[link(name = "procstat")]

0 commit comments

Comments
 (0)