diff options
| author | bors <bors@rust-lang.org> | 2015-12-28 20:11:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-12-28 20:11:34 +0000 |
| commit | 9007d63f2484c0c19cb122cd909db3efe3607313 (patch) | |
| tree | 8ca2ff4dfae13458534ac5270badde38d015f7dc /src/libstd | |
| parent | 27a1834ce522e3ec7fe4726b1661de16ee30c503 (diff) | |
| parent | b0a9b3d4581524c075e43626c4bac4ba7ee01255 (diff) | |
| download | rust-9007d63f2484c0c19cb122cd909db3efe3607313.tar.gz rust-9007d63f2484c0c19cb122cd909db3efe3607313.zip | |
Auto merge of #30548 - mmcco:linux-syscall, r=brson
There's no need for us to redeclare it in an extern block. We should probably put the syscall number constants in libc too.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/rand/os.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libstd/rand/os.rs b/src/libstd/rand/os.rs index c7cb10a4707..45c29e83b39 100644 --- a/src/libstd/rand/os.rs +++ b/src/libstd/rand/os.rs @@ -32,10 +32,6 @@ mod imp { target_arch = "aarch64", target_arch = "powerpc")))] fn getrandom(buf: &mut [u8]) -> libc::c_long { - extern "C" { - fn syscall(number: libc::c_long, ...) -> libc::c_long; - } - #[cfg(target_arch = "x86_64")] const NR_GETRANDOM: libc::c_long = 318; #[cfg(target_arch = "x86")] @@ -46,7 +42,7 @@ mod imp { const NR_GETRANDOM: libc::c_long = 278; unsafe { - syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(), 0) + libc::syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(), 0) } } |
