summaryrefslogtreecommitdiffstats
path: root/Python/random.c
diff options
context:
space:
mode:
authorNed Deily <nad@python.org>2016-11-12 21:35:48 (GMT)
committerNed Deily <nad@python.org>2016-11-12 21:35:48 (GMT)
commit7ae411264933bfc845c3647cde478508c7981ad3 (patch)
tree4f8f7f13cef5f19bf8c71d05db829658b084215b /Python/random.c
parent022371ff945a4d0012cdcdc209031a132e43a5c9 (diff)
downloadcpython-7ae411264933bfc845c3647cde478508c7981ad3.zip
cpython-7ae411264933bfc845c3647cde478508c7981ad3.tar.gz
cpython-7ae411264933bfc845c3647cde478508c7981ad3.tar.bz2
Issue #28676: Prevent missing 'getentropy' declaration warning on macOS.
Patch by Gareth Rees.
Diffstat (limited to 'Python/random.c')
-rw-r--r--Python/random.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/random.c b/Python/random.c
index f2ada5f..154f6f9 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