summaryrefslogtreecommitdiff
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
commitb5d7e3e992080cb3c7db6f18de7ea17e60036fcf (patch)
tree1636c22978cada11cd8d5ef8053d00d0af505ef7
parent933c0337a10fd81b6a44138b4a5756230964ab40 (diff)
downloadcpython-b5d7e3e992080cb3c7db6f18de7ea17e60036fcf.tar.gz
only include sys/random.h if it seems like it might have something useful (#29057)
-rw-r--r--Python/random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/random.c b/Python/random.c
index 944ef31ee2..d20393926f 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)