diff options
Diffstat (limited to 'src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs')
-rw-r--r-- | src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs index 94baa09059..89729a8162 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs @@ -197,12 +197,16 @@ pub const F_SEAL_SHRINK: ::c_int = 0x0002; pub const F_SEAL_GROW: ::c_int = 0x0004; pub const F_SEAL_WRITE: ::c_int = 0x0008; +pub const GRND_NONBLOCK: ::c_uint = 0x1; +pub const GRND_RANDOM: ::c_uint = 0x2; + cfg_if! { if #[cfg(not(freebsd13))] { pub const ELAST: ::c_int = 96; } else { pub const EINTEGRITY: ::c_int = 97; pub const ELAST: ::c_int = 97; + pub const GRND_INSECURE: ::c_uint = 0x4; } } @@ -229,6 +233,12 @@ extern "C" { ) -> ::c_int; pub fn fdatasync(fd: ::c_int) -> ::c_int; + + pub fn getrandom( + buf: *mut ::c_void, + buflen: ::size_t, + flags: ::c_uint + ) -> ::ssize_t; } cfg_if! { |