aboutsummaryrefslogtreecommitdiff
path: root/src/solaris_illumos.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/solaris_illumos.rs')
-rw-r--r--src/solaris_illumos.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/solaris_illumos.rs b/src/solaris_illumos.rs
index 2d1b767..cf3067d 100644
--- a/src/solaris_illumos.rs
+++ b/src/solaris_illumos.rs
@@ -30,6 +30,7 @@ type GetRandomFn = unsafe extern "C" fn(*mut u8, libc::size_t, libc::c_uint) ->
type GetRandomFn = unsafe extern "C" fn(*mut u8, libc::size_t, libc::c_uint) -> libc::c_int;
pub fn getrandom_inner(dest: &mut [u8]) -> Result<(), Error> {
+ // getrandom(2) was introduced in Solaris 11.3 for Illumos in 2015.
static GETRANDOM: Weak = unsafe { Weak::new("getrandom\0") };
if let Some(fptr) = GETRANDOM.ptr() {
let func: GetRandomFn = unsafe { mem::transmute(fptr) };