Skip to content

Commit

Permalink
[musl] add posix_spawn chdir functions
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sunshowers committed Sep 29, 2024
1 parent c73a50d commit b68a159
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libc-test/semver/linux-musl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ getutxline
lio_listio
ntptimeval
open_wmemstream
posix_spawn_file_actions_addchdir_np
posix_spawn_file_actions_addfchdir_np
preadv2
preadv64
prlimit
Expand Down
11 changes: 11 additions & 0 deletions src/unix/linux_like/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,17 @@ extern "C" {
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;

// Added in `musl` 1.1.24
pub fn posix_spawn_file_actions_addchdir_np(
actions: *mut ::posix_spawn_file_actions_t,
path: *const ::c_char,
) -> ::c_int;
// Added in `musl` 1.1.24
pub fn posix_spawn_file_actions_addfchdir_np(
actions: *mut ::posix_spawn_file_actions_t,
fd: ::c_int,
) -> ::c_int;

pub fn getutxent() -> *mut utmpx;
pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
Expand Down

0 comments on commit b68a159

Please sign in to comment.