summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-03 11:42:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-03 11:42:24 +0000
commitb2a7a289e046cbbfc7f439f312a7204c174c3869 (patch)
treee811c2606e6398e4f6afff8a804a0a6cadc2c80a /random.c
parentd0045da598f13c32606b1bf04f2eac5c3759761a (diff)
Fix Random.urandom in a chroot on OpenBSD
[ruby-core:90850] [Bug #15494] From: jeremyevans0 (Jeremy Evans) <merch-redmine@jeremyevans.net> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r--random.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/random.c b/random.c
index 4f6d51d..38dfaeb 100644
--- a/random.c
+++ b/random.c
@@ -89,6 +89,11 @@ The original copyright notice follows.
#endif
#include "ruby_atomic.h"
+#ifdef __OpenBSD__
+/* to define OpenBSD for version check */
+#include <sys/param.h>
+#endif
+
typedef int int_must_be_32bit_at_least[sizeof(int) * CHAR_BIT < 32 ? -1 : 1];
/* Period parameters */