From 081991e7e1d4181a22687331b0f504765370835d Mon Sep 17 00:00:00 2001 From: Vadim Chugunov Date: Mon, 28 Jul 2014 13:35:34 -0700 Subject: Fix crash in OsRng when compiling with -O. --- src/libstd/rand/os.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/rand/os.rs b/src/libstd/rand/os.rs index 60e2c4c8949..ffe8e539ffb 100644 --- a/src/libstd/rand/os.rs +++ b/src/libstd/rand/os.rs @@ -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: -- cgit 1.4.1-3-g733a5