]> git.lizzy.rs Git - rust.git/commitdiff
Fix crash in OsRng when compiling with -O.
authorVadim Chugunov <vadimcn@gmail.com>
Mon, 28 Jul 2014 20:35:34 +0000 (13:35 -0700)
committerVadim Chugunov <vadimcn@gmail.com>
Tue, 5 Aug 2014 00:43:49 +0000 (17:43 -0700)
src/libstd/rand/os.rs

index 60e2c4c894919eb8266b200c958135d9e7c7d70b..ffe8e539ffba13b9b07516eb393fce74d3354a0a 100644 (file)
@@ -136,10 +136,11 @@ mod imp {
     use rand::Rng;
     use result::{Ok, Err};
     use rt::stack;
-    use self::libc::{c_ulong, DWORD, BYTE, LPCSTR, BOOL};
+    use self::libc::{DWORD, BYTE, LPCSTR, BOOL};
+    use self::libc::types::os::arch::extra::{LONG_PTR};
     use slice::MutableVector;
 
-    type HCRYPTPROV = c_ulong;
+    type HCRYPTPROV = LONG_PTR;
 
     /// A random number generator that retrieves randomness straight from
     /// the operating system. Platform sources: