Skip to content

Commit a37cdde

Browse files
ChanTsunetgross35
authored andcommitted
Add getpwnam_r, getpwuid_r to emscripten (#3906)
(backport <#3906>) (cherry picked from commit d5b17d5)
1 parent 5951de5 commit a37cdde

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

libc-test/semver/emscripten.txt

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
getentropy
22
posix_fallocate64
3+
getpwnam_r
4+
getpwuid_r

src/unix/linux_like/emscripten/mod.rs

+15
Original file line numberDiff line numberDiff line change
@@ -1776,6 +1776,21 @@ extern "C" {
17761776
) -> ::c_int;
17771777

17781778
pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;
1779+
1780+
pub fn getpwnam_r(
1781+
name: *const ::c_char,
1782+
pwd: *mut passwd,
1783+
buf: *mut ::c_char,
1784+
buflen: ::size_t,
1785+
result: *mut *mut passwd,
1786+
) -> ::c_int;
1787+
pub fn getpwuid_r(
1788+
uid: ::uid_t,
1789+
pwd: *mut passwd,
1790+
buf: *mut ::c_char,
1791+
buflen: ::size_t,
1792+
result: *mut *mut passwd,
1793+
) -> ::c_int;
17791794
}
17801795

17811796
// Alias <foo> to <foo>64 to mimic glibc's LFS64 support

0 commit comments

Comments
 (0)