File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 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+
15Tue Jul 7 16:47:30 2015 Eric Wong <e@80x24.org>
26
37 * compile.c (COMPILE_ERROR): reduce GET_THREAD() calls
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments