We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
improper_ctypes
1 parent 0fb8ab0 commit 847fba0Copy full SHA for 847fba0
src/libstd/rand/os.rs
@@ -185,7 +185,7 @@ mod imp {
185
use io;
186
use mem;
187
use rand::Rng;
188
- use libc::{c_int, size_t};
+ use libc::{c_int, c_void, size_t};
189
190
/// A random number generator that retrieves randomness straight from
191
/// the operating system. Platform sources:
@@ -203,8 +203,9 @@ mod imp {
203
_dummy: (),
204
}
205
206
- #[repr(C)]
207
- struct SecRandom;
+ // Fake definition; this is actually a struct, but we don't use the
+ // contents here.
208
+ type SecRandom = c_void;
209
210
#[allow(non_upper_case_globals)]
211
const kSecRandomDefault: *const SecRandom = 0 as *const SecRandom;
0 commit comments