summaryrefslogtreecommitdiff
path: root/src/unix/bsd/mod.rs
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2022-02-14 20:23:23 +0000
committerDavid Carlier <devnexen@gmail.com>2022-02-14 20:23:23 +0000
commit0a0158947b3d70511f04b4e236cf86eb9ad3c863 (patch)
tree7138c019197d1c463c2e49ea5ba5f20108241b69 /src/unix/bsd/mod.rs
parente2e056bc50e22dc475a798bb648d117a88298f5f (diff)
downloadrust-libc-0a0158947b3d70511f04b4e236cf86eb9ad3c863.tar.gz
BSD add deterministic rand api
Diffstat (limited to 'src/unix/bsd/mod.rs')
-rw-r--r--src/unix/bsd/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs
index a08506d16a..a0729ee545 100644
--- a/src/unix/bsd/mod.rs
+++ b/src/unix/bsd/mod.rs
@@ -867,6 +867,16 @@ extern "C" {
pub fn arc4random() -> u32;
pub fn arc4random_buf(buf: *mut ::c_void, size: ::size_t);
pub fn arc4random_uniform(l: u32) -> u32;
+
+ pub fn drand48() -> ::c_double;
+ pub fn erand48(xseed: *mut ::c_ushort) -> ::c_double;
+ pub fn lrand48() -> ::c_long;
+ pub fn nrand48(xseed: *mut ::c_ushort) -> ::c_long;
+ pub fn mrand48() -> ::c_long;
+ pub fn jrand48(xseed: *mut ::c_ushort) -> ::c_long;
+ pub fn srand48(seed: ::c_long);
+ pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort;
+ pub fn lcong48(p: *mut ::c_ushort);
}
cfg_if! {