summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--random/rndgetentropy.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index b870e426..73c93578 100644
--- a/configure.ac
+++ b/configure.ac
@@ -844,7 +844,7 @@ AC_SEARCH_LIBS(setsockopt, [nsl])
#### Checks for header files. ####
##################################
-AC_CHECK_HEADERS(unistd.h sys/auxv.h)
+AC_CHECK_HEADERS(unistd.h sys/auxv.h sys/random.h)
##########################################
diff --git a/random/rndgetentropy.c b/random/rndgetentropy.c
index a64b7299..7580873e 100644
--- a/random/rndgetentropy.c
+++ b/random/rndgetentropy.c
@@ -26,6 +26,9 @@
#include <sys/types.h>
#include <string.h>
#include <unistd.h>
+#ifdef HAVE_SYS_RANDOM_H
+#include <sys/random.h>
+#endif
#include "types.h"
#include "g10lib.h"