Skip to content

Commit 4f66d02

Browse files
committed
* random.c (fill_random_bytes_syscall): fix compile error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 7c94c02 commit 4f66d02

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Tue Jul 7 18:18:41 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
2+
3+
* random.c (fill_random_bytes_syscall): fix compile error.
4+
15
Tue Jul 7 16:47:30 2015 Eric Wong <e@80x24.org>
26

37
* compile.c (COMPILE_ERROR): reduce GET_THREAD() calls

random.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -521,12 +521,13 @@ fill_random_bytes_syscall(void *seed, size_t size)
521521
{
522522
static rb_atomic_t try_syscall = 1;
523523
if (try_syscall) {
524+
int ret;
524525
errno = 0;
525-
ret = syscall(SYS_getrandom, seed, size, 0)
526-
if (errno == ENOSYS) {
527-
try_syscall = 0;
528-
return -1;
529-
}
526+
ret = syscall(SYS_getrandom, seed, size, 0);
527+
if (errno == ENOSYS) {
528+
try_syscall = 0;
529+
return -1;
530+
}
530531
if ((size_t)ret == size) return 0;
531532
}
532533
return -1;

0 commit comments

Comments
 (0)