From: Benjamin Peterson Date: Mon, 2 Jan 2017 04:29:36 +0000 (-0600) Subject: only include sys/random.h if it seems like it might have something useful (#29057) X-Git-Tag: v3.5.3rc1~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=493ac1bbe02a57d08e0f8a76b436626f86b03796;p=python only include sys/random.h if it seems like it might have something useful (#29057) --- 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 # 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)