summaryrefslogtreecommitdiffstats
path: root/vendor/getrandom/src/macos.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/getrandom/src/macos.rs')
-rw-r--r--vendor/getrandom/src/macos.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/vendor/getrandom/src/macos.rs b/vendor/getrandom/src/macos.rs
index 585a35abd..671a053bf 100644
--- a/vendor/getrandom/src/macos.rs
+++ b/vendor/getrandom/src/macos.rs
@@ -17,6 +17,7 @@ use core::mem;
type GetEntropyFn = unsafe extern "C" fn(*mut u8, libc::size_t) -> libc::c_int;
pub fn getrandom_inner(dest: &mut [u8]) -> Result<(), Error> {
+ // getentropy(2) was added in 10.12, Rust supports 10.7+
static GETENTROPY: Weak = unsafe { Weak::new("getentropy\0") };
if let Some(fptr) = GETENTROPY.ptr() {
let func: GetEntropyFn = unsafe { mem::transmute(fptr) };