From 493ac1bbe02a57d08e0f8a76b436626f86b03796 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 1 Jan 2017 22:29:36 -0600 Subject: [PATCH] only include sys/random.h if it seems like it might have something useful (#29057) --- Python/random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/random.c b/Python/random.c index 944ef31ee2a..d20393926f2 100644 --- a/Python/random.c +++ b/Python/random.c @@ -9,7 +9,7 @@ # ifdef HAVE_LINUX_RANDOM_H # include # endif -# ifdef HAVE_SYS_RANDOM_H +# if defined(HAVE_SYS_RANDOM_H) && (defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY)) # include # endif # if !defined(HAVE_GETRANDOM) && defined(HAVE_GETRANDOM_SYSCALL)