Skip to content

Commit af80ac4

Browse files
devnexentgross35
authored andcommitted
arc4random api for haiku
(backport <#3945>) (cherry picked from commit 8924123)
1 parent cbad5be commit af80ac4

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4834,6 +4834,7 @@ fn test_haiku(target: &str) {
48344834
"libutil.h",
48354835
"link.h",
48364836
"pty.h",
4837+
"stdlib.h",
48374838
"stringlist.h",
48384839
"sys/link_elf.h",
48394840
}

src/unix/haiku/mod.rs

Lines changed: 4 additions & 0 deletions
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)