Fix NR_GETRANDOM for linux x32
This commit is contained in:
parent
40edeccad6
commit
8e962433f9
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue