Skip to content

Commit c800e28

Browse files
sunshowerstgross35
authored andcommitted
[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 (backport <rust-lang#3949>) (cherry picked from commit b68a159)
1 parent af80ac4 commit c800e28

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

libc-test/semver/linux-musl.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ getloadavg
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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,17 @@ extern "C" {
983983

984984
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
985985
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
986+
987+
// Added in `musl` 1.1.24
988+
pub fn posix_spawn_file_actions_addchdir_np(
989+
actions: *mut ::posix_spawn_file_actions_t,
990+
path: *const ::c_char,
991+
) -> ::c_int;
992+
// Added in `musl` 1.1.24
993+
pub fn posix_spawn_file_actions_addfchdir_np(
994+
actions: *mut ::posix_spawn_file_actions_t,
995+
fd: ::c_int,
996+
) -> ::c_int;
986997
}
987998

988999
// Alias <foo> to <foo>64 to mimic glibc's LFS64 support

0 commit comments

Comments
 (0)