From 4f60fa31f4573869eea3aabb2de11760e12208b3 Mon Sep 17 00:00:00 2001 From: ocean Date: Thu, 6 Jan 2005 08:24:04 +0000 Subject: * random.c (random_seed): O_NONBLOCK isn't defined on some platforms. [ruby-dev:25417] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- random.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'random.c') diff --git a/random.c b/random.c index b069c1dc8..6a4ed2d28 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 -- cgit