Skip to content

Commit 4d9390b

Browse files
committed
Auto merge of #2309 - devnexen:fuchsia_getrandom_eq, r=JohnTitor
fuchsia add getrandom equivalent zx_cprng_draw.
2 parents 40f470a + 5b8616e commit 4d9390b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

libc-test/semver/fuchsia.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,3 +1370,6 @@ utimensat
13701370
vhangup
13711371
vmsplice
13721372
waitid
1373+
zx_cprng_add_entropy
1374+
zx_cprng_draw
1375+
zx_status_t

src/fuchsia/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ pub type rlim_t = ::c_ulonglong;
8989
pub type c_long = i64;
9090
pub type c_ulong = u64;
9191

92+
pub type zx_status_t = i32;
93+
9294
// FIXME: why are these uninhabited types? that seems... wrong?
9395
// Presumably these should be `()` or an `extern type` (when that stabilizes).
9496
#[cfg_attr(feature = "extra_traits", derive(Debug))]
@@ -4228,6 +4230,9 @@ extern "C" {
42284230
>,
42294231
data: *mut ::c_void,
42304232
) -> ::c_int;
4233+
4234+
pub fn zx_cprng_draw(buffer: *mut ::c_void, buffer_size: ::size_t);
4235+
pub fn zx_cprng_add_entropy(buffer: *const ::c_void, buffer_size: ::size_t) -> ::zx_status_t;
42314236
}
42324237

42334238
cfg_if! {

0 commit comments

Comments
 (0)