Skip to content

Commit

Permalink
arc4random api for haiku
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen authored and tgross35 committed Oct 15, 2024
1 parent f48d010 commit 8924123
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 @@ -4795,6 +4795,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 @@ -2133,6 +2133,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 8924123

Please sign in to comment.