summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'random.c')
-rw-r--r--random.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/random.c b/random.c
index 4a9d4de..3fcc424 100644
--- a/random.c
+++ b/random.c
@@ -518,10 +518,6 @@ fill_random_bytes_syscall(void *seed, size_t size)
#elif defined __linux__ && defined SYS_getrandom
#include <linux/random.h>
-# ifndef GRND_NONBLOCK
-# define GRND_NONBLOCK 0x0001 /* not defined in musl libc */
-# endif
-
static int
fill_random_bytes_syscall(void *seed, size_t size)
{
@@ -529,7 +525,7 @@ fill_random_bytes_syscall(void *seed, size_t size)
if (try_syscall) {
long ret;
errno = 0;
- ret = syscall(SYS_getrandom, seed, size, GRND_NONBLOCK);
+ ret = syscall(SYS_getrandom, seed, size, 0);
if (errno == ENOSYS) {
ATOMIC_SET(try_syscall, 0);
return -1;