commit | 493ac1bbe02a57d08e0f8a76b436626f86b03796 | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Sun Jan 01 22:29:36 2017 -0600 |
committer | Benjamin Peterson <benjamin@python.org> | Sun Jan 01 22:29:36 2017 -0600 |
tree | a7e73860d5684c405ba3eca010a4d2bef7fe1769 | |
parent | c9d4c60a562f66ca73509ef682e88a1726b860f8 [diff] |
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 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)