diff options
author | Ned Deily <nad@python.org> | 2016-11-12 16:35:48 -0500 |
---|---|---|
committer | Ned Deily <nad@python.org> | 2016-11-12 16:35:48 -0500 |
commit | 3848a693dfe11b1d153089321390ee9ea9927b1a (patch) | |
tree | e43767776d824dfc946723b0c7e5ddc47ed097cf /Python/random.c | |
parent | e9ac1ba48e87c6cfb4faac29c427ebf33283cd2c (diff) | |
download | cpython-3848a693dfe11b1d153089321390ee9ea9927b1a.tar.gz |
Issue #28676: Prevent missing 'getentropy' declaration warning on macOS.
Patch by Gareth Rees.
Diffstat (limited to 'Python/random.c')
-rw-r--r-- | Python/random.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/random.c b/Python/random.c index f2ada5f0d8..154f6f9684 100644 --- a/Python/random.c +++ b/Python/random.c @@ -9,9 +9,10 @@ # ifdef HAVE_LINUX_RANDOM_H # include <linux/random.h> # endif -# ifdef HAVE_GETRANDOM +# if defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY) # include <sys/random.h> -# elif defined(HAVE_GETRANDOM_SYSCALL) +# endif +# if !defined(HAVE_GETRANDOM) && defined(HAVE_GETRANDOM_SYSCALL) # include <sys/syscall.h> # endif #endif |