diff options
Diffstat (limited to 'src/unix/linux_like/linux/mod.rs')
-rw-r--r-- | src/unix/linux_like/linux/mod.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 0d7b511539..eb068d337e 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -2587,7 +2587,17 @@ extern "C" { pub fn endspent(); pub fn getspent() -> *mut spwd; - pub fn getspnam(__name: *const ::c_char) -> *mut spwd; + pub fn getspnam(name: *const ::c_char) -> *mut spwd; + // Only `getspnam_r` is implemented for musl, out of all of the reenterant + // functions from `shadow.h`. + // https://git.musl-libc.org/cgit/musl/tree/include/shadow.h + pub fn getspnam_r( + name: *const ::c_char, + spbuf: *mut spwd, + buf: *mut ::c_char, + buflen: ::size_t, + spbufp: *mut *mut spwd, + ) -> ::c_int; pub fn shm_open( name: *const c_char, |