Project

General

Profile

Feature #13103 ยป 0001-random.c-fill_random_bytes_syscall-use-__NR_-prefix-.patch

normalperson (Eric Wong), 01/04/2017 08:05 PM

View differences:

random.c
CryptGenRandom(prov, size, seed);
return 0;
}
#elif defined __linux__ && defined SYS_getrandom
#elif defined __linux__ && defined __NR_getrandom
#include <linux/random.h>
# ifndef GRND_NONBLOCK
......
if (!need_secure)
flags = GRND_NONBLOCK;
errno = 0;
ret = syscall(SYS_getrandom, seed, size, flags);
ret = syscall(__NR_getrandom, seed, size, flags);
if (errno == ENOSYS) {
ATOMIC_SET(try_syscall, 0);
return -1;
-
    (1-1/1)