aboutsummaryrefslogtreecommitdiffstats
path: root/random.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-06 07:18:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-06 07:18:34 +0000
commitb66745712b82c0082f5e49723eadaeead39b9e21 (patch)
tree69bd9e852b35b370632c8e191062808aeb13d967 /random.c
parent0f2d636c79ead1863107c678158348047384d037 (diff)
downloadruby-b66745712b82c0082f5e49723eadaeead39b9e21.tar.gz
random.c: fill_random_bytes_syscall function
* random.c (fill_random_bytes_syscall): turned into a static function, to be inlined probably, so that it is unavailable if it is a preprocessor macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r--random.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/random.c b/random.c
index bfc1febd8d..e255f3445e 100644
--- a/random.c
+++ b/random.c
@@ -481,7 +481,12 @@ fill_random_bytes_urandom(void *seed, size_t size)
#if 0
#elif defined(HAVE_ARC4RANDOM_BUF)
-#define fill_random_bytes_syscall(buf, size, unused) (arc4random_buf(buf, size), 0)
+static int
+fill_random_bytes_syscall(void *buf, size_t size, int unused)
+{
+ arc4random_buf(buf, size);
+ return 0;
+}
#elif defined(_WIN32)
static void
release_crypt(void *p)