зеркало из https://github.com/github/ruby.git
* random.c (fill_random_bytes_syscall): use ATOMIC_SET() for
updating try_syscall. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
0bdf13a104
Коммит
a4c6ad1d19
|
@ -1,3 +1,8 @@
|
|||
Sun Oct 18 13:24:17 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* random.c (fill_random_bytes_syscall): use ATOMIC_SET() for
|
||||
updating try_syscall.
|
||||
|
||||
Sun Oct 18 13:03:52 2015 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* include/ruby/backward/util.h: Good-by Borland-C.
|
||||
|
|
2
random.c
2
random.c
|
@ -531,7 +531,7 @@ fill_random_bytes_syscall(void *seed, size_t size)
|
|||
errno = 0;
|
||||
ret = syscall(SYS_getrandom, seed, size, GRND_NONBLOCK);
|
||||
if (errno == ENOSYS) {
|
||||
try_syscall = 0;
|
||||
ATOMIC_SET(try_syscall, 0);
|
||||
return -1;
|
||||
}
|
||||
if ((size_t)ret == size) return 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче