summaryrefslogtreecommitdiff
path: root/src/lib/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/random.c')
-rw-r--r--src/lib/random.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/random.c b/src/lib/random.c
index 3751668e..971f5b5a 100644
--- a/src/lib/random.c
+++ b/src/lib/random.c
@@ -40,7 +40,7 @@
#include <gcrypt.h>
#elif defined(__FreeBSD__)
#include <stdlib.h>
-#elif defined(HAVE_OPENSSL)
+#elif defined(HAVE_OPENSSL_RNG)
#include <openssl/rand.h>
#include <limits.h>
#endif
@@ -58,7 +58,7 @@ int random_buffer(void * buf,
#elif defined(HAVE_LIBGCRYPT)
gcry_randomize(buf, len, GCRY_STRONG_RANDOM);
return 0;
-#elif defined(HAVE_OPENSSL)
+#elif defined(HAVE_OPENSSL_RNG)
if (len > 0 && len < INT_MAX)
return RAND_bytes((unsigned char *) buf, (int) len);
return -1;