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! {
1090
1090
pub const PTHREAD_MUTEX_ADAPTIVE_NP : :: c_int = 3 ;
1091
1091
1092
1092
extern "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 ;
1093
1113
pub fn qsort_r (
1094
1114
base : * mut :: c_void ,
1095
1115
num : :: size_t ,
Original file line number Diff line number Diff line change @@ -2579,7 +2579,17 @@ extern "C" {
2579
2579
pub fn endspent ( ) ;
2580
2580
pub fn getspent ( ) -> * mut spwd ;
2581
2581
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 ;
2583
2593
2584
2594
pub fn shm_open (
2585
2595
name : * const c_char ,
You can’t perform that action at this time.
0 commit comments