We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ce1daf commit b0a9b3dCopy full SHA for b0a9b3d
src/libstd/rand/os.rs
@@ -32,10 +32,6 @@ mod imp {
32
target_arch = "aarch64",
33
target_arch = "powerpc")))]
34
fn getrandom(buf: &mut [u8]) -> libc::c_long {
35
- extern "C" {
36
- fn syscall(number: libc::c_long, ...) -> libc::c_long;
37
- }
38
-
39
#[cfg(target_arch = "x86_64")]
40
const NR_GETRANDOM: libc::c_long = 318;
41
#[cfg(target_arch = "x86")]
@@ -46,7 +42,7 @@ mod imp {
46
42
const NR_GETRANDOM: libc::c_long = 278;
47
43
48
44
unsafe {
49
- syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(), 0)
45
+ libc::syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(), 0)
50
}
51
52
0 commit comments