summaryrefslogtreecommitdiffstats
path: root/Python/random.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2017-01-02 04:29:36 (GMT)
committerBenjamin Peterson <benjamin@python.org>2017-01-02 04:29:36 (GMT)
commit493ac1bbe02a57d08e0f8a76b436626f86b03796 (patch)
treea7e73860d5684c405ba3eca010a4d2bef7fe1769 /Python/random.c
parentc9d4c60a562f66ca73509ef682e88a1726b860f8 (diff)
downloadcpython-493ac1bbe02a57d08e0f8a76b436626f86b03796.zip
cpython-493ac1bbe02a57d08e0f8a76b436626f86b03796.tar.gz
cpython-493ac1bbe02a57d08e0f8a76b436626f86b03796.tar.bz2
only include sys/random.h if it seems like it might have something useful (#29057)
Diffstat (limited to 'Python/random.c')
-rw-r--r--Python/random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/random.c b/Python/random.c
index 944ef31..d203939 100644
--- a/Python/random.c
+++ b/Python/random.c
@@ -9,7 +9,7 @@
# ifdef HAVE_LINUX_RANDOM_H
# include <linux/random.h>
# endif
-# ifdef HAVE_SYS_RANDOM_H
+# if defined(HAVE_SYS_RANDOM_H) && (defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY))
# include <sys/random.h>
# endif
# if !defined(HAVE_GETRANDOM) && defined(HAVE_GETRANDOM_SYSCALL)