Skip to content

Commit 27e91b6

Browse files
authored
Merge pull request #3945 from devnexen/haiku_arc4random
arc4random api for haiku
2 parents f6945f7 + 8924123 commit 27e91b6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

libc-test/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4795,6 +4795,7 @@ fn test_haiku(target: &str) {
47954795
"libutil.h",
47964796
"link.h",
47974797
"pty.h",
4798+
"stdlib.h",
47984799
"stringlist.h",
47994800
"sys/link_elf.h",
48004801
}

src/unix/haiku/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -2133,6 +2133,10 @@ extern "C" {
21332133
>,
21342134
data: *mut ::c_void,
21352135
) -> ::c_int;
2136+
2137+
pub fn arc4random() -> u32;
2138+
pub fn arc4random_uniform(upper_bound: u32) -> u32;
2139+
pub fn arc4random_buf(buf: *mut ::c_void, n: ::size_t);
21362140
}
21372141

21382142
#[link(name = "gnu")]

0 commit comments

Comments
 (0)