Skip to content

Commit 847fba0

Browse files
committed
Fix improper_ctypes fallout
1 parent 0fb8ab0 commit 847fba0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/libstd/rand/os.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ mod imp {
185185
use io;
186186
use mem;
187187
use rand::Rng;
188-
use libc::{c_int, size_t};
188+
use libc::{c_int, c_void, size_t};
189189

190190
/// A random number generator that retrieves randomness straight from
191191
/// the operating system. Platform sources:
@@ -203,8 +203,9 @@ mod imp {
203203
_dummy: (),
204204
}
205205

206-
#[repr(C)]
207-
struct SecRandom;
206+
// Fake definition; this is actually a struct, but we don't use the
207+
// contents here.
208+
type SecRandom = c_void;
208209

209210
#[allow(non_upper_case_globals)]
210211
const kSecRandomDefault: *const SecRandom = 0 as *const SecRandom;

0 commit comments

Comments
 (0)