diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nxt_random.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nxt_random.c b/src/nxt_random.c index 27387b1f..0731b7fb 100644 --- a/src/nxt_random.c +++ b/src/nxt_random.c @@ -58,8 +58,6 @@ nxt_random_stir(nxt_random_t *r) u_char bytes[NXT_RANDOM_KEY_SIZE]; } key; - n = 0; - #if (NXT_HAVE_GETRANDOM) n = getrandom(&key, NXT_RANDOM_KEY_SIZE, 0); @@ -70,6 +68,10 @@ nxt_random_stir(nxt_random_t *r) n = syscall(SYS_getrandom, &key, NXT_RANDOM_KEY_SIZE, 0); +#else + + n = 0; + #endif if (n != NXT_RANDOM_KEY_SIZE) { |