Skip to content

Commit

Permalink
Auto merge of #2309 - devnexen:fuchsia_getrandom_eq, r=JohnTitor
Browse files Browse the repository at this point in the history
fuchsia add getrandom equivalent zx_cprng_draw.
  • Loading branch information
bors committed Aug 3, 2021
2 parents 40f470a + 5b8616e commit 4d9390b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/semver/fuchsia.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1370,3 +1370,6 @@ utimensat
vhangup
vmsplice
waitid
zx_cprng_add_entropy
zx_cprng_draw
zx_status_t
5 changes: 5 additions & 0 deletions src/fuchsia/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ pub type rlim_t = ::c_ulonglong;
pub type c_long = i64;
pub type c_ulong = u64;

pub type zx_status_t = i32;

// FIXME: why are these uninhabited types? that seems... wrong?
// Presumably these should be `()` or an `extern type` (when that stabilizes).
#[cfg_attr(feature = "extra_traits", derive(Debug))]
Expand Down Expand Up @@ -4228,6 +4230,9 @@ extern "C" {
>,
data: *mut ::c_void,
) -> ::c_int;

pub fn zx_cprng_draw(buffer: *mut ::c_void, buffer_size: ::size_t);
pub fn zx_cprng_add_entropy(buffer: *const ::c_void, buffer_size: ::size_t) -> ::zx_status_t;
}

cfg_if! {
Expand Down

0 comments on commit 4d9390b

Please sign in to comment.