summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2017-01-01 22:29:36 -0600
committerBenjamin Peterson <benjamin@python.org>2017-01-01 22:29:36 -0600
commit2f7d13c662cfc159d57d5896478e29759752e3e5 (patch)
treeddf24be0545cd65c57e695636db529c2233c65eb /Python
parentea02cdc7ecdc16d1b9b09bdfee0b04f88b9548f0 (diff)
downloadcpython-git-2f7d13c662cfc159d57d5896478e29759752e3e5.tar.gz
only include sys/random.h if it seems like it might have something useful (#29057)
Diffstat (limited to 'Python')
-rw-r--r--Python/random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/random.c b/Python/random.c
index 08b2a998dd..57c41ffcd6 100644
--- a/Python/random.c
+++ b/Python/random.c
@@ -3,7 +3,7 @@
#include <windows.h>
#else
#include <fcntl.h>
-#ifdef HAVE_SYS_RANDOM_H
+#if defined(HAVE_SYS_RANDOM_H) && (defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY))
#include <sys/random.h>
#endif
#endif