fix check for SYS_random

This commit is contained in:
Kent Overstreet 2019-04-10 17:37:00 -04:00
parent 3a59ff72a0
commit 0abf87f973
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@
#include <sys/syscall.h> #include <sys/syscall.h>
#include <linux/bug.h> #include <linux/bug.h>
#ifdef __NR_getrandom #ifdef SYS_getrandom
static inline int getrandom(void *buf, size_t buflen, unsigned int flags) static inline int getrandom(void *buf, size_t buflen, unsigned int flags)
{ {
return syscall(SYS_getrandom, buf, buflen, flags); return syscall(SYS_getrandom, buf, buflen, flags);

View File

@ -120,7 +120,7 @@ static void sched_init(void)
rcu_register_thread(); rcu_register_thread();
} }
#ifndef __NR_getrandom #ifndef SYS_getrandom
#include <fcntl.h> #include <fcntl.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>