From a685037a420d3a5fbc61390c1cee7e4842f17e34 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Wed, 1 Nov 2023 18:47:36 -0700 Subject: [PATCH] redox: Add remaining `grp.h` functions --- libc-test/semver/redox.txt | 5 +++++ src/unix/redox/mod.rs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/libc-test/semver/redox.txt b/libc-test/semver/redox.txt index 6e73d0ac25f7d..5f85e1aa7f3d4 100644 --- a/libc-test/semver/redox.txt +++ b/libc-test/semver/redox.txt @@ -180,6 +180,7 @@ bsearch chroot clearerr difftime +endgrent endpwent endservent epoll_create @@ -191,7 +192,10 @@ explicit_bzero fchdir fmemopen getdtablesize +getgrent +getgrgid getgrgid_r +getgrnam getgrnam_r getgrouplist getline @@ -212,6 +216,7 @@ pipe2 pthread_condattr_setclock qsort reallocarray +setgrent setpwent setrlimit setservent diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs index 900337b4f7e21..cd219a777288f 100644 --- a/src/unix/redox/mod.rs +++ b/src/unix/redox/mod.rs @@ -1080,6 +1080,10 @@ extern "C" { pub fn getdtablesize() -> ::c_int; // grp.h + pub fn getgrent() -> *mut ::group; + pub fn setgrent(); + pub fn endgrent(); + pub fn getgrgid(gid: ::gid_t) -> *mut ::group; pub fn getgrgid_r( gid: ::gid_t, grp: *mut ::group, @@ -1087,6 +1091,7 @@ extern "C" { buflen: ::size_t, result: *mut *mut ::group, ) -> ::c_int; + pub fn getgrnam(name: *const ::c_char) -> *mut ::group; pub fn getgrnam_r( name: *const ::c_char, grp: *mut ::group,