Skip to content

Commit 03bb5a3

Browse files
committed
[musl] add posix_spawn chdir functions
Add `posix_spawn_file_actions_add[f]chdir_np`, as present in musl 1.1.24 and above ([reference]). [reference]: https://git.musl-libc.org/cgit/musl/commit/?id=74244e5b3ed4a61d99c5fc0967b69e5c9a753456
1 parent 09d7aa0 commit 03bb5a3

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

libc-test/semver/linux-musl.txt

+2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ getutxline
8080
lio_listio
8181
ntptimeval
8282
open_wmemstream
83+
posix_spawn_file_actions_addchdir_np
84+
posix_spawn_file_actions_addfchdir_np
8385
preadv2
8486
preadv64
8587
prlimit

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

+11
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,17 @@ extern "C" {
968968
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
969969
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
970970

971+
// Added in `musl` 1.1.24
972+
pub fn posix_spawn_file_actions_addchdir_np(
973+
actions: *mut ::posix_spawn_file_actions_t,
974+
path: *const ::c_char,
975+
) -> ::c_int;
976+
// Added in `musl` 1.1.24
977+
pub fn posix_spawn_file_actions_addfchdir_np(
978+
actions: *mut ::posix_spawn_file_actions_t,
979+
fd: ::c_int,
980+
) -> ::c_int;
981+
971982
pub fn getutxent() -> *mut utmpx;
972983
pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
973984
pub fn getutxline(ut: *const utmpx) -> *mut utmpx;

0 commit comments

Comments
 (0)