diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-09-01 17:37:24 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-09-01 17:37:24 -0400 |
| commit | 12345a85d9c7d7a56ddf323247a4bdf347021b73 (patch) | |
| tree | 93bafb42c1ec2c22cc2858936034901c39cbca82 /lib/random/sysrandom.h | |
| parent | c778c8822f1c8acf981e26f7b860a384c94cff6f (diff) | |
| parent | adc2d81b5683e611c5f3289be6157d4519a60632 (diff) | |
Merge branch 'main' into optional-list-indexing
Diffstat (limited to 'lib/random/sysrandom.h')
| -rw-r--r-- | lib/random/sysrandom.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/random/sysrandom.h b/lib/random/sysrandom.h deleted file mode 100644 index 3d6b800f..00000000 --- a/lib/random/sysrandom.h +++ /dev/null @@ -1,17 +0,0 @@ -// Logic for using system random numbers - -#pragma once - -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) -#include <stdlib.h> -static ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) { - (void)flags; - arc4random_buf(buf, buflen); - return buflen; -} -#elif defined(__linux__) -// Use getrandom() -#include <sys/random.h> -#else -#error "Unsupported platform for secure random number generation" -#endif |
