Merge "Fix getrandom syscall checking"
This commit is contained in:
commit
5a073a18f3
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@
|
|||
#include "private/libc_logging.h"
|
||||
|
||||
void __libc_safe_arc4random_buf(void* buf, size_t n, KernelArgumentBlock& args) {
|
||||
static bool have_getrandom = syscall(SYS_getrandom, nullptr, 0, 0) == -1 && errno != ENOSYS;
|
||||
static bool have_getrandom = syscall(SYS_getrandom, nullptr, 0, 0) != -1 || errno != ENOSYS;
|
||||
static bool have_urandom = access("/dev/urandom", R_OK) == 0;
|
||||
static size_t at_random_bytes_consumed = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue