File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
src/unix/linux_like/linux Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -1090,6 +1090,26 @@ cfg_if! {
10901090pub const PTHREAD_MUTEX_ADAPTIVE_NP : :: c_int = 3 ;
10911091
10921092extern "C" {
1093+ pub fn fgetspent_r (
1094+ fp : * mut :: FILE ,
1095+ spbuf : * mut :: spwd ,
1096+ buf : * mut :: c_char ,
1097+ buflen : :: size_t ,
1098+ spbufp : * mut * mut :: spwd ,
1099+ ) -> :: c_int ;
1100+ pub fn sgetspent_r (
1101+ s : * const :: c_char ,
1102+ spbuf : * mut :: spwd ,
1103+ buf : * mut :: c_char ,
1104+ buflen : :: size_t ,
1105+ spbufp : * mut * mut :: spwd ,
1106+ ) -> :: c_int ;
1107+ pub fn getspent_r (
1108+ spbuf : * mut :: spwd ,
1109+ buf : * mut :: c_char ,
1110+ buflen : :: size_t ,
1111+ spbufp : * mut * mut :: spwd ,
1112+ ) -> :: c_int ;
10931113 pub fn qsort_r (
10941114 base : * mut :: c_void ,
10951115 num : :: size_t ,
Original file line number Diff line number Diff line change @@ -2579,7 +2579,17 @@ extern "C" {
25792579 pub fn endspent ( ) ;
25802580 pub fn getspent ( ) -> * mut spwd ;
25812581
2582- pub fn getspnam ( __name : * const :: c_char ) -> * mut spwd ;
2582+ pub fn getspnam ( name : * const :: c_char ) -> * mut spwd ;
2583+ // Only `getspnam_r` is implemented for musl, out of all of the reenterant
2584+ // functions from `shadow.h`.
2585+ // https://git.musl-libc.org/cgit/musl/tree/include/shadow.h
2586+ pub fn getspnam_r (
2587+ name : * const :: c_char ,
2588+ spbuf : * mut spwd ,
2589+ buf : * mut :: c_char ,
2590+ buflen : :: size_t ,
2591+ spbufp : * mut * mut spwd ,
2592+ ) -> :: c_int ;
25832593
25842594 pub fn shm_open (
25852595 name : * const c_char ,
You can’t perform that action at this time.
0 commit comments