diff options
| author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-06 08:24:04 +0000 |
|---|---|---|
| committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-06 08:24:04 +0000 |
| commit | b1391247e31a4967296ce6e647456b0d63d21f7c (patch) | |
| tree | 443b6b19e2363b10787e1a92cbbc98b15c5555e9 | |
| parent | aa67fc1ef9cb40dd3a7a29064cb067a7ddac133e (diff) | |
| download | ruby-b1391247e31a4967296ce6e647456b0d63d21f7c.tar.gz ruby-b1391247e31a4967296ce6e647456b0d63d21f7c.tar.xz ruby-b1391247e31a4967296ce6e647456b0d63d21f7c.zip | |
* 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/trunk@7736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | random.c | 5 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Thu Jan 6 17:22:41 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp> + + * random.c (random_seed): O_NONBLOCK isn't defined on some + platforms. [ruby-dev:25417] + Thu Jan 6 13:45:35 2005 Tanaka Akira <akr@m17n.org> * lib/time.rb: recognize +00:00 and GMT as a localtime. @@ -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 |
