diff options
Diffstat (limited to 'src/random.c')
-rw-r--r-- | src/random.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/random.c b/src/random.c index 70bf13b..7bffe30 100644 --- a/src/random.c +++ b/src/random.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <string.h> | 18 | #include <string.h> |
19 | #if defined(__linux__) | 19 | #if defined(__linux__) |
20 | #include <sys/random.h> // getrandom() | 20 | #include <sys/random.h> // getrandom() |
21 | #elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) | 21 | #elif defined(__APPLE__) || defined(__unix__) |
22 | #include <stdlib.h> // arc4random_buf() | 22 | #include <stdlib.h> // arc4random_buf() |
23 | #endif | 23 | #endif |
24 | #endif | 24 | #endif |
@@ -80,7 +80,7 @@ static int lua_get_random_bytes(lua_State* L) { | |||
80 | total_read += n; | 80 | total_read += n; |
81 | } | 81 | } |
82 | 82 | ||
83 | #elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) | 83 | #elif defined(__APPLE__) || defined(__unix__) |
84 | // Use arc4random_buf() on BSD/macOS | 84 | // Use arc4random_buf() on BSD/macOS |
85 | arc4random_buf(buffer, num_bytes); | 85 | arc4random_buf(buffer, num_bytes); |
86 | 86 | ||