You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Explicitly specify types to arguments of 'libc::syscall' (rust-random#74)
The 'libc::syscall' function uses varargs - as a result, its arguments
are completely untyped. THe user must ensure that it is called with the
proper types for the targeted syscall - otherwise, the calling
convention might cause arguments to be put into the wrong registers.
This commit explicitly casts the arguments to 'libc::syscall' to the
proper type for the 'getrandom' syscall. This ensures that the correct
types for the target platform will always be used, instead of relying on
the types used happening to match those required by the target platform.
This particular commit is a backport of
6716ad0, with the addition of
`sys_fill_exact` from master (originally committed in
65660e0) to make the backport more
obviously correct.
# Conflicts:
# src/linux_android.rs
0 commit comments