~ chicken-core (chicken-5) 9bcb1017cf96e81d35b0846451224a02b628b5ee
commit 9bcb1017cf96e81d35b0846451224a02b628b5ee
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Sat Nov 4 13:38:58 2017 +0100
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Sat Nov 4 13:38:58 2017 +0100
hardcode GRND_NONBLOCK as header might not be available
diff --git a/runtime.c b/runtime.c
index 95ff16ab..4f22989f 100644
--- a/runtime.c
+++ b/runtime.c
@@ -12554,7 +12554,8 @@ C_word C_random_bytes(C_word buf, C_word size)
arc4random_buf(C_data_pointer(buf), count);
#elif defined(SYS_getrandom) && defined(__NR_getrandom)
while(count > 0) {
- r = syscall(SYS_getrandom, C_data_pointer(buf) + off, count, GRND_NONBLOCK);
+ /* GRND_NONBLOCK = 0x0001 */
+ r = syscall(SYS_getrandom, C_data_pointer(buf) + off, count, 1);
if(r == -1) {
if(errno != EINTR) return C_SCHEME_FALSE;
Trap