about summary refs log tree commit diff
path: root/library/std/src/sys/windows/rand.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys/windows/rand.rs')
-rw-r--r--library/std/src/sys/windows/rand.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/library/std/src/sys/windows/rand.rs b/library/std/src/sys/windows/rand.rs
index cdf37cfe911..bca4e38d9f6 100644
--- a/library/std/src/sys/windows/rand.rs
+++ b/library/std/src/sys/windows/rand.rs
@@ -1,3 +1,4 @@
+use crate::ffi::c_void;
 use crate::io;
 use crate::mem;
 use crate::ptr;
@@ -25,8 +26,9 @@ pub fn hashmap_random_keys() -> (u64, u64) {
 #[inline(never)]
 fn fallback_rng() -> (u64, u64) {
     let mut v = (0, 0);
-    let ret =
-        unsafe { c::RtlGenRandom(&mut v as *mut _ as *mut u8, mem::size_of_val(&v) as c::ULONG) };
+    let ret = unsafe {
+        c::RtlGenRandom(&mut v as *mut _ as *mut c_void, mem::size_of_val(&v) as c::ULONG)
+    };
 
     if ret != 0 { v } else { panic!("fallback RNG broken: {}", io::Error::last_os_error()) }
 }