aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-12-01 00:27:37 +0100
committerKim Alvefur <zash@zash.se>2017-12-01 00:27:37 +0100
commita128e97e03539bf324ce12c3e980c5bf27c62644 (patch)
treeb0a925408c2a68e373fae701030287aa33110829
parent812c872f7a3a389864d72a1017cfb350a0a33aa1 (diff)
downloadprosody-a128e97e03539bf324ce12c3e980c5bf27c62644.tar.gz
prosody-a128e97e03539bf324ce12c3e980c5bf27c62644.zip
util.crand: Always include stdlib to be sure __GLIBC_PREREQ is defined
-rw-r--r--util-src/crand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util-src/crand.c b/util-src/crand.c
index 7eea1f2b..51d934c8 100644
--- a/util-src/crand.c
+++ b/util-src/crand.c
@@ -21,6 +21,8 @@
#define _DEFAULT_SOURCE
+#include <stdlib.h>
+
#include "lualib.h"
#include "lauxlib.h"
@@ -49,11 +51,9 @@ int getrandom(void *buf, size_t buflen, unsigned int flags) {
#include <sys/random.h>
#endif
-#elif defined(WITH_ARC4RANDOM)
-#include <stdlib.h>
#elif defined(WITH_OPENSSL)
#include <openssl/rand.h>
-#else
+#elif ! defined(WITH_ARC4RANDOM)
#error util.crand compiled without a random source
#endif