aboutsummaryrefslogtreecommitdiffstats
path: root/stdlib/arc4random.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/arc4random.c')
-rw-r--r--stdlib/arc4random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/arc4random.c b/stdlib/arc4random.c
index 3ae8fc1302..7818cb9cf6 100644
--- a/stdlib/arc4random.c
+++ b/stdlib/arc4random.c
@@ -51,7 +51,7 @@ __arc4random_buf (void *p, size_t n)
n -= l;
continue; /* Interrupted by a signal; keep going. */
}
- else if (l == -ENOSYS)
+ else if (l < 0 && errno == ENOSYS)
break; /* No syscall, so fallback to /dev/urandom. */
arc4random_getrandom_failure ();
}