1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-16 02:09:56 +00:00

Get rid of warning on BSDs.

This commit is contained in:
Calvin Rose 2019-12-15 16:04:43 -06:00
parent c7912249b2
commit 2b2c1ff917

View File

@ -59,6 +59,12 @@ extern char **environ;
#include <mach/mach.h>
#endif
/* Setting C99 standard makes this not available, but it should
* work/link properly if we detect a BSD */
#if defined(JANET_BSD) || defined(JANET_APPLE)
void arc4random_buf(void *buf, size_t nbytes);
#endif
#endif /* JANET_REDCUED_OS */
/* Core OS functions */
@ -551,7 +557,6 @@ static Janet os_cryptorand(int32_t argc, Janet *argv) {
RETRY_EINTR(rc, close(randfd));
#elif defined(JANET_BSD) || defined(JANET_APPLE)
(void) genericerr;
arc4random_buf(buffer->data + offset, n);
#else
(void) genericerr;