Skip to content

Commit

Permalink
arc4random api for haiku
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Sep 28, 2024
1 parent 0292b4e commit 2622f46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4577,6 +4577,7 @@ fn test_haiku(target: &str) {
"libutil.h",
"link.h",
"pty.h",
"stdlib.h",
"stringlist.h",
"sys/link_elf.h",
}
Expand Down
4 changes: 4 additions & 0 deletions src/unix/haiku/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2055,6 +2055,10 @@ extern "C" {
>,
data: *mut ::c_void,
) -> ::c_int;

pub fn arc4random() -> u32;
pub fn arc4random_uniform(upper_bound: u32) -> u32;
pub fn arc4random_buf(buf: *mut ::c_void, n: ::size_t);
}

#[link(name = "gnu")]
Expand Down

0 comments on commit 2622f46

Please sign in to comment.