diff --git a/libc-test/semver/emscripten.txt b/libc-test/semver/emscripten.txt index d61541c4f2baf..150a7fb8a6c6f 100644 --- a/libc-test/semver/emscripten.txt +++ b/libc-test/semver/emscripten.txt @@ -1,5 +1,9 @@ AT_EACCESS getentropy +getgrgid +getgrnam +getgrnam_r +getgrgid_r posix_fallocate64 getpwnam_r getpwuid_r diff --git a/src/unix/linux_like/emscripten/mod.rs b/src/unix/linux_like/emscripten/mod.rs index 4a8bf8dbb6b2d..c492f49f2995d 100644 --- a/src/unix/linux_like/emscripten/mod.rs +++ b/src/unix/linux_like/emscripten/mod.rs @@ -1791,6 +1791,24 @@ extern "C" { buflen: ::size_t, result: *mut *mut passwd, ) -> ::c_int; + + // grp.h + pub fn getgrgid(gid: ::gid_t) -> *mut ::group; + pub fn getgrnam(name: *const ::c_char) -> *mut ::group; + pub fn getgrnam_r( + name: *const ::c_char, + grp: *mut ::group, + buf: *mut ::c_char, + buflen: ::size_t, + result: *mut *mut ::group, + ) -> ::c_int; + pub fn getgrgid_r( + gid: ::gid_t, + grp: *mut ::group, + buf: *mut ::c_char, + buflen: ::size_t, + result: *mut *mut ::group, + ) -> ::c_int; } // Alias to 64 to mimic glibc's LFS64 support