aboutsummaryrefslogtreecommitdiff
path: root/examples/random/sysrandom.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/random/sysrandom.h')
-rw-r--r--examples/random/sysrandom.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/examples/random/sysrandom.h b/examples/random/sysrandom.h
deleted file mode 100644
index ea29296b..00000000
--- a/examples/random/sysrandom.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#pragma once
-
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
-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