Skip to content

Commit 0c17db2

Browse files
committed
feat: closefrom() and close_range() for FreeBSD
1 parent c7a860d commit 0c17db2

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

libc-test/semver/freebsd.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2237,3 +2237,5 @@ xucred
22372237
eaccess
22382238
dirname
22392239
basename
2240+
closefrom
2241+
close_from

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ extern "C" {
522522

523523
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
524524
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
525+
pub fn close_range(lowfd: ::c_uint, highfd: ::c_uint, flags: ::c_int) -> ::c_int;
525526
}
526527

527528
#[link(name = "kvm")]

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ extern "C" {
522522

523523
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
524524
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
525+
pub fn close_range(lowfd: ::c_uint, highfd: ::c_uint, flags: ::c_int) -> ::c_int;
525526
}
526527

527528
#[link(name = "kvm")]

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5422,6 +5422,7 @@ extern "C" {
54225422
new_value: *const itimerspec,
54235423
old_value: *mut itimerspec,
54245424
) -> ::c_int;
5425+
pub fn closefrom(lowfd: ::c_int);
54255426
}
54265427

54275428
#[link(name = "memstat")]

0 commit comments

Comments
 (0)