diff options
Diffstat (limited to 'src/nxt_random.c')
-rw-r--r-- | src/nxt_random.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nxt_random.c b/src/nxt_random.c index 3dde1f15..27387b1f 100644 --- a/src/nxt_random.c +++ b/src/nxt_random.c @@ -62,9 +62,13 @@ nxt_random_stir(nxt_random_t *r) #if (NXT_HAVE_GETRANDOM) - /* Linux 3.17 getrandom(). */ + n = getrandom(&key, NXT_RANDOM_KEY_SIZE, 0); - n = getrandom(key, NXT_RANDOM_KEY_SIZE, 0); +#elif (NXT_HAVE_LINUX_SYS_GETRANDOM) + + /* Linux 3.17 SYS_getrandom. */ + + n = syscall(SYS_getrandom, &key, NXT_RANDOM_KEY_SIZE, 0); #endif |