summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'random.c')
-rw-r--r--random.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/random.c b/random.c
index b069c1dc89..6a4ed2d286 100644
--- a/random.c
+++ b/random.c
@@ -275,7 +275,10 @@ random_seed()
memset(digits, 0, big->len * SIZEOF_BDIGITS);
#ifdef S_ISCHR
- if ((fd = open("/dev/urandom", O_RDONLY|O_NONBLOCK
+ if ((fd = open("/dev/urandom", O_RDONLY
+#ifdef O_NONBLOCK
+ |O_NONBLOCK
+#endif
#ifdef O_NOCTTY
|O_NOCTTY
#endif