Skip to content

Commit 2c46c2a

Browse files
committed
Add glibc extensions for posix_spawn*.
1 parent 7349741 commit 2c46c2a

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

libc-test/semver/linux-gnu.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,10 @@ ntp_adjtime
626626
ntp_gettime
627627
ntptimeval
628628
open_wmemstream
629+
posix_spawn_file_actions_addchdir_np
630+
posix_spawn_file_actions_addfchdir_np
631+
posix_spawn_file_actions_addclosefrom_np
632+
posix_spawn_file_actions_addtcsetpgrp_np
629633
preadv2
630634
preadv64
631635
prlimit

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,30 @@ extern "C" {
13771377
pub fn gnu_get_libc_version() -> *const ::c_char;
13781378
}
13791379

1380+
// posix/spawn.h
1381+
extern "C" {
1382+
// Added in `glibc` 2.29
1383+
pub fn posix_spawn_file_actions_addchdir_np(
1384+
actions: *mut ::posix_spawn_file_actions_t,
1385+
path: *const ::c_char,
1386+
) -> ::c_int;
1387+
// Added in `glibc` 2.29
1388+
pub fn posix_spawn_file_actions_addfchdir_np(
1389+
actions: *mut ::posix_spawn_file_actions_t,
1390+
fd: ::c_int,
1391+
) -> ::c_int;
1392+
// Added in `glibc` 2.34
1393+
pub fn posix_spawn_file_actions_addclosefrom_np(
1394+
actions: *mut ::posix_spawn_file_actions_t,
1395+
from: ::c_int,
1396+
) -> ::c_int;
1397+
// Added in `glibc` 2.35
1398+
pub fn posix_spawn_file_actions_addtcsetpgrp_np(
1399+
actions: *mut ::posix_spawn_file_actions_t,
1400+
tcfd: ::c_int,
1401+
) -> ::c_int;
1402+
}
1403+
13801404
cfg_if! {
13811405
if #[cfg(any(target_arch = "x86",
13821406
target_arch = "arm",

0 commit comments

Comments
 (0)