summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-05 21:33:26 (GMT)
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-05 21:33:26 (GMT)
commit9b02f55c5098217fc1150f77b250c4735308a976 (patch)
treea4b957715fee313ca4d2ce24451471f7c46ce3af /random.c
parentaf49e886eb856874e7346ef2966aead6bcf9188c (diff)
merge revision(s) 66699: [Backport #15494]
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/branches/ruby_2_6@66729 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 */