Skip to content

Commit c6f84ea

Browse files
committed
use GRND_NONBLOCK
1 parent e941652 commit c6f84ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime-light/stdlib/math/random-functions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ inline int64_t secure_rand_buf(char* const buf, int64_t length) noexcept {
9696
arc4random_buf(static_cast<void*>(buf), static_cast<size_t>(length));
9797
return 0;
9898
#else
99-
return getrandom(buf, static_cast<size_t>(length), 0x0);
99+
return getrandom(buf, static_cast<size_t>(length), GRND_NONBLOCK);
100100
#endif
101101
}
102102

0 commit comments

Comments
 (0)