aboutsummaryrefslogtreecommitdiffstats
path: root/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'random.c')
-rw-r--r--random.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/random.c b/random.c
index 7b78efe7ca..c11cd803f2 100644
--- a/random.c
+++ b/random.c
@@ -50,7 +50,9 @@
#endif
#if defined HAVE_GETRANDOM || defined HAVE_GETENTROPY
-# include <sys/random.h>
+# if defined(HAVE_SYS_RANDOM_H)
+# include <sys/random.h>
+# endif
#elif defined __linux__ && defined __NR_getrandom
# include <linux/random.h>
#endif