Skip to content

Commit 5d228ea

Browse files
committed
Auto merge of #2698 - devnexen:linux_glibc_getentropy, r=Amanieu
linux glibc add getentropy.
2 parents de9e477 + 3044f1b commit 5d228ea

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,9 @@ fn test_android(target: &str) {
17591759
// Added in API level 30, but tests use level 28.
17601760
"mlock2" => true,
17611761

1762+
// Added in glibc 2.25.
1763+
"getentropy" => true,
1764+
17621765
_ => false,
17631766
}
17641767
});

libc-test/semver/linux-gnu.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ explicit_bzero
584584
fgetspent_r
585585
futimes
586586
getauxval
587+
getentropy
587588
getgrent_r
588589
getloadavg
589590
getpt

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,6 +1185,7 @@ extern "C" {
11851185
mask: ::c_uint,
11861186
statxbuf: *mut statx,
11871187
) -> ::c_int;
1188+
pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;
11881189
pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t;
11891190
pub fn getauxval(type_: ::c_ulong) -> ::c_ulong;
11901191

0 commit comments

Comments
 (0)