Skip to content

Commit 8054c0c

Browse files
tobhetgross35
authored andcommitted
closefrom: add NetBSD, OpenBSD, DragonflyBSD
NetBSD, OpenBSD and DragonFly return c_int, FreeBSD returns void, so we can't just add it in freebsdlike. Apple doesn't seem to support closefrom at all at this point. (backport <rust-lang#4290>) (cherry picked from commit 8512ab4)
1 parent 01f3990 commit 8054c0c

File tree

5 files changed

+7
-0
lines changed

5 files changed

+7
-0
lines changed

libc-test/semver/dragonfly.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1296,6 +1296,7 @@ clock_getcpuclockid
12961296
clock_getres
12971297
clock_nanosleep
12981298
clock_settime
1299+
closefrom
12991300
cmsgcred
13001301
cmsghdr
13011302
cpuctl_cpuid_args_t

libc-test/semver/netbsd.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1252,6 +1252,7 @@ clearerr
12521252
clock_getres
12531253
clock_nanosleep
12541254
clock_settime
1255+
closefrom
12551256
cmsghdr
12561257
consttime_memequal
12571258
daemon

libc-test/semver/openbsd.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,7 @@ chroot
10681068
clearerr
10691069
clock_getres
10701070
clock_settime
1071+
closefrom
10711072
cmsghdr
10721073
daemon
10731074
devname

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

+2
Original file line numberDiff line numberDiff line change
@@ -1702,6 +1702,8 @@ extern "C" {
17021702
mntvbufp: *mut *mut crate::statvfs,
17031703
flags: c_int,
17041704
) -> c_int;
1705+
1706+
pub fn closefrom(lowfd: c_int) -> c_int;
17051707
}
17061708

17071709
#[link(name = "rt")]

src/unix/bsd/netbsdlike/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,8 @@ extern "C" {
861861
flags: c_int,
862862
timeout: *mut crate::timespec,
863863
) -> c_int;
864+
865+
pub fn closefrom(lowfd: c_int) -> c_int;
864866
}
865867

866868
cfg_if! {

0 commit comments

Comments
 (0)