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
505 505
    CryptGenRandom(prov, size, seed);
506 506
    return 0;
507 507
}
508
#elif defined __linux__ && defined SYS_getrandom
508
#elif defined __linux__ && defined __NR_getrandom
509 509
#include <linux/random.h>
510 510

  
511 511
# ifndef GRND_NONBLOCK
......
522 522
	if (!need_secure)
523 523
	    flags = GRND_NONBLOCK;
524 524
	errno = 0;
525
	ret = syscall(SYS_getrandom, seed, size, flags);
525
	ret = syscall(__NR_getrandom, seed, size, flags);
526 526
	if (errno == ENOSYS) {
527 527
	    ATOMIC_SET(try_syscall, 0);
528 528
	    return -1;
529
-