diff options
| author | Tamir Duberstein <tamird@gmail.com> | 2015-07-24 16:03:43 -0400 |
|---|---|---|
| committer | Tamir Duberstein <tamird@gmail.com> | 2015-07-24 16:16:56 -0400 |
| commit | 847fba06c3005d05ddd22d82cdabc66a0e9e378e (patch) | |
| tree | 82a5f39e3204d3a5b15e67ad14aecf20efdec143 /src/libstd | |
| parent | 0fb8ab04bcdd93f522b594da72a966f39a5268b0 (diff) | |
| download | rust-847fba06c3005d05ddd22d82cdabc66a0e9e378e.tar.gz rust-847fba06c3005d05ddd22d82cdabc66a0e9e378e.zip | |
Fix `improper_ctypes` fallout
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/rand/os.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstd/rand/os.rs b/src/libstd/rand/os.rs index fc9585d9190..d881acba94e 100644 --- a/src/libstd/rand/os.rs +++ b/src/libstd/rand/os.rs @@ -185,7 +185,7 @@ mod imp { use io; use mem; use rand::Rng; - use libc::{c_int, size_t}; + use libc::{c_int, c_void, size_t}; /// A random number generator that retrieves randomness straight from /// the operating system. Platform sources: @@ -203,8 +203,9 @@ mod imp { _dummy: (), } - #[repr(C)] - struct SecRandom; + // Fake definition; this is actually a struct, but we don't use the + // contents here. + type SecRandom = c_void; #[allow(non_upper_case_globals)] const kSecRandomDefault: *const SecRandom = 0 as *const SecRandom; |
