Skip to content

Commit

Permalink
Fix NR_GETRANDOM for linux x32
Browse files Browse the repository at this point in the history
  • Loading branch information
malbarbo committed Oct 31, 2017
1 parent 40edecc commit 8e96243
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libstd/sys/unix/rand.rs
Expand Up @@ -49,7 +49,9 @@ mod imp {
target_arch = "powerpc64",
target_arch = "s390x")))]
fn getrandom(buf: &mut [u8]) -> libc::c_long {
#[cfg(target_arch = "x86_64")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
const NR_GETRANDOM: libc::c_long = 0x40000000 + 318;
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
const NR_GETRANDOM: libc::c_long = 318;
#[cfg(target_arch = "x86")]
const NR_GETRANDOM: libc::c_long = 355;
Expand Down

0 comments on commit 8e96243

Please sign in to comment.