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! {
1087
1087
pub const PTHREAD_MUTEX_ADAPTIVE_NP : :: c_int = 3 ;
1088
1088
1089
1089
extern "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 ;
1090
1110
pub fn qsort_r (
1091
1111
base : * mut :: c_void ,
1092
1112
num : :: size_t ,
Original file line number Diff line number Diff line change @@ -2587,7 +2587,17 @@ extern "C" {
2587
2587
pub fn endspent ( ) ;
2588
2588
pub fn getspent ( ) -> * mut spwd ;
2589
2589
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 ;
2591
2601
2592
2602
pub fn shm_open (
2593
2603
name : * const c_char ,
You can’t perform that action at this time.
0 commit comments