Skip to content

Commit

Permalink
Auto merge of #2943 - SteveLauC:fgetpwent_r-and-fgetgrent_r-on-GNU-Li…
Browse files Browse the repository at this point in the history
…nux, r=JohnTitor

add fgetpwent_r and fgetgrent_r on GNU/Linux

[man page for `fgetpwent_r()`](https://man7.org/linux/man-pages/man3/getpwent_r.3.html)

[man page for `fgetgrent_r()`](https://man7.org/linux/man-pages/man3/getgrent_r.3.html)
  • Loading branch information
bors committed Oct 9, 2022
2 parents 2dfe1ab + b1ccdcc commit a0ff4d2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libc-test/semver/linux-gnu.txt
Expand Up @@ -589,9 +589,11 @@ futimes
getauxval
getentropy
getgrent_r
fgetgrent_r
getloadavg
getpt
getpwent_r
fgetpwent_r
getpwnam_r
getspent_r
getutxent
Expand Down
14 changes: 14 additions & 0 deletions src/unix/linux_like/linux/gnu/mod.rs
Expand Up @@ -1310,6 +1310,20 @@ extern "C" {
buflen: ::size_t,
result: *mut *mut ::group,
) -> ::c_int;
pub fn fgetpwent_r(
stream: *mut ::FILE,
pwd: *mut ::passwd,
buf: *mut ::c_char,
buflen: ::size_t,
result: *mut *mut ::passwd,
) -> ::c_int;
pub fn fgetgrent_r(
stream: *mut ::FILE,
grp: *mut ::group,
buf: *mut ::c_char,
buflen: ::size_t,
result: *mut *mut ::group,
) -> ::c_int;

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

Expand Down

0 comments on commit a0ff4d2

Please sign in to comment.