Skip to content

Commit 173757d

Browse files
committed
feat: add close_range for glibc
1 parent c7a860d commit 173757d

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3378,6 +3378,7 @@ fn test_linux(target: &str) {
33783378
"sys/fanotify.h",
33793379
// <sys/auxv.h> is not present on uclibc
33803380
[!uclibc]: "sys/auxv.h",
3381+
[gnu]: "linux/close_range.h",
33813382
}
33823383

33833384
// note: aio.h must be included before sys/mount.h

libc-test/semver/linux-gnu.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,3 +665,4 @@ getmntent_r
665665
putpwent
666666
putgrent
667667
execveat
668+
close_range

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,6 +1399,13 @@ extern "C" {
13991399
envp: *const *mut c_char,
14001400
flags: ::c_int,
14011401
) -> ::c_int;
1402+
1403+
// Added in `glibc` 2.34
1404+
pub fn close_range(
1405+
first: ::c_uint,
1406+
last: ::c_uint,
1407+
flags: ::c_int,
1408+
) -> ::c_int;
14021409
}
14031410

14041411
cfg_if! {

0 commit comments

Comments
 (0)