Diff

util-src/crand.c @ 8448:f516a52f19e8

util.crand: Make it possible to use arc4random on Linux (needs libbsd)
author Kim Alvefur <zash@zash.se>
date Sun, 03 Dec 2017 15:21:12 +0100
parent 8447:200f4f1b7833
child 8449:b572a708fd41
line wrap: on
line diff
--- a/util-src/crand.c	Sun Dec 03 15:03:25 2017 +0100
+++ b/util-src/crand.c	Sun Dec 03 15:21:12 2017 +0100
@@ -54,7 +54,11 @@
 
 #elif defined(WITH_OPENSSL)
 #include <openssl/rand.h>
-#elif ! defined(WITH_ARC4RANDOM)
+#elif defined(WITH_ARC4RANDOM)
+#ifdef __linux__
+#include <bsd/stdlib.h>
+#endif
+#else
 #error util.crand compiled without a random source
 #endif