Skip to content

Commit b1ccdcc

Browse files
committed
add fgetpwent_r and fgetgrent_r on GNU/Linux
1 parent 198beb0 commit b1ccdcc

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

libc-test/semver/linux-gnu.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,9 +589,11 @@ futimes
589589
getauxval
590590
getentropy
591591
getgrent_r
592+
fgetgrent_r
592593
getloadavg
593594
getpt
594595
getpwent_r
596+
fgetpwent_r
595597
getpwnam_r
596598
getspent_r
597599
getutxent

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,20 @@ extern "C" {
13101310
buflen: ::size_t,
13111311
result: *mut *mut ::group,
13121312
) -> ::c_int;
1313+
pub fn fgetpwent_r(
1314+
stream: *mut ::FILE,
1315+
pwd: *mut ::passwd,
1316+
buf: *mut ::c_char,
1317+
buflen: ::size_t,
1318+
result: *mut *mut ::passwd,
1319+
) -> ::c_int;
1320+
pub fn fgetgrent_r(
1321+
stream: *mut ::FILE,
1322+
grp: *mut ::group,
1323+
buf: *mut ::c_char,
1324+
buflen: ::size_t,
1325+
result: *mut *mut ::group,
1326+
) -> ::c_int;
13131327

13141328
pub fn sethostid(hostid: ::c_long) -> ::c_int;
13151329

0 commit comments

Comments
 (0)