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 @@ -1087,6 +1087,26 @@ cfg_if! {
10871087pub const PTHREAD_MUTEX_ADAPTIVE_NP : :: c_int = 3 ;
10881088
10891089extern "C" {
1090+ pub fn fgetspent_r (
1091+ fp : * mut :: FILE ,
1092+ spbuf : * mut :: spwd ,
1093+ buf : * mut :: c_char ,
1094+ buflen : :: size_t ,
1095+ spbufp : * mut * mut :: spwd ,
1096+ ) -> :: c_int ;
1097+ pub fn sgetspent_r (
1098+ s : * const :: c_char ,
1099+ spbuf : * mut :: spwd ,
1100+ buf : * mut :: c_char ,
1101+ buflen : :: size_t ,
1102+ spbufp : * mut * mut :: spwd ,
1103+ ) -> :: c_int ;
1104+ pub fn getspent_r (
1105+ spbuf : * mut :: spwd ,
1106+ buf : * mut :: c_char ,
1107+ buflen : :: size_t ,
1108+ spbufp : * mut * mut :: spwd ,
1109+ ) -> :: c_int ;
10901110 pub fn qsort_r (
10911111 base : * mut :: c_void ,
10921112 num : :: size_t ,
Original file line number Diff line number Diff line change @@ -2587,7 +2587,17 @@ extern "C" {
25872587 pub fn endspent ( ) ;
25882588 pub fn getspent ( ) -> * mut spwd ;
25892589
2590- pub fn getspnam ( __name : * const :: c_char ) -> * mut spwd ;
2590+ pub fn getspnam ( name : * const :: c_char ) -> * mut spwd ;
2591+ // Only `getspnam_r` is implemented for musl, out of all of the reenterant
2592+ // functions from `shadow.h`.
2593+ // https://git.musl-libc.org/cgit/musl/tree/include/shadow.h
2594+ pub fn getspnam_r (
2595+ name : * const :: c_char ,
2596+ spbuf : * mut spwd ,
2597+ buf : * mut :: c_char ,
2598+ buflen : :: size_t ,
2599+ spbufp : * mut * mut spwd ,
2600+ ) -> :: c_int ;
25912601
25922602 pub fn shm_open (
25932603 name : * const c_char ,
You can’t perform that action at this time.
0 commit comments