BSD os.c fix with arc4random.

This commit is contained in:
Calvin Rose committed 2019-12-15 12:47:12 -06:00
1 parent f1afc5b0b4
commit 58ff7f0788
1 file changed
+1 -1
+1 -1
View File
@@ -27,6 +27,7 @@
#ifndef JANET_REDUCED_OS
#include <stdlib.h>
#include <time.h>
#include <fcntl.h>
#include <errno.h>
@@ -549,7 +550,6 @@ static Janet os_cryptorand(int32_t argc, Janet *argv) {
}
RETRY_EINTR(rc, close(randfd));
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
(void) errmsg;
arc4random_buf(buffer->data + offset, n);
#else
janet_panic("cryptorand currently unsupported on this platform");