mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 19:19:53 +00:00
Fix arc4random_buf implementation.
This commit is contained in:
parent
76cfbde933
commit
70ad98cc6f
@ -677,9 +677,9 @@ int janet_cryptorand(uint8_t *out, size_t n) {
|
||||
RETRY_EINTR(rc, close(randfd));
|
||||
return 0;
|
||||
#elif defined(JANET_BSD) || defined(MAC_OS_X_VERSION_10_7)
|
||||
arc4random_buf(out, sz);
|
||||
arc4random_buf(out, n);
|
||||
return 0;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user