Skip to content
Snippets Groups Projects
Commit 962b9847 authored by Greg V's avatar Greg V
Browse files

FreeBSD: new rand()/srand() ABI in 13

parent 9fc25745
No related branches found
No related tags found
No related merge requests found
......@@ -322,7 +322,14 @@ pub const EXTATTR_NAMESPACE_EMPTY: ::c_int = 0;
pub const EXTATTR_NAMESPACE_USER: ::c_int = 1;
pub const EXTATTR_NAMESPACE_SYSTEM: ::c_int = 2;
pub const RAND_MAX: ::c_int = 0x7fff_fffd;
cfg_if! {
if #[cfg(any(freebsd10, freebsd11, freebsd12))] {
pub const RAND_MAX: ::c_int = 0x7fff_fffd;
} else {
pub const RAND_MAX: ::c_int = 0x7fff_ffff;
}
}
pub const PTHREAD_STACK_MIN: ::size_t = MINSIGSTKSZ;
pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 4;
pub const SIGSTKSZ: ::size_t = MINSIGSTKSZ + 32768;
......
......@@ -580,7 +580,15 @@ extern "C" {
pub fn abs(i: ::c_int) -> ::c_int;
pub fn atof(s: *const ::c_char) -> ::c_double;
pub fn labs(i: ::c_long) -> ::c_long;
#[cfg_attr(
all(target_os = "freebsd", any(freebsd12, freebsd11, freebsd10)),
link_name = "rand@FBSD_1.0"
)]
pub fn rand() -> ::c_int;
#[cfg_attr(
all(target_os = "freebsd", any(freebsd12, freebsd11, freebsd10)),
link_name = "srand@FBSD_1.0"
)]
pub fn srand(seed: ::c_uint);
pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment