summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNed Deily <nad@python.org>2016-11-12 21:38:03 (GMT)
committerNed Deily <nad@python.org>2016-11-12 21:38:03 (GMT)
commit7d895d3c37e2ff5189d2d8b71def4e2fee34f10b (patch)
tree817401d32d3e841c96c61ca23b276d7bebb147b6
parent58d3e54556a97c92ea8720691f534f71281c9f2c (diff)
parent7ae411264933bfc845c3647cde478508c7981ad3 (diff)
downloadcpython-7d895d3c37e2ff5189d2d8b71def4e2fee34f10b.zip
cpython-7d895d3c37e2ff5189d2d8b71def4e2fee34f10b.tar.gz
cpython-7d895d3c37e2ff5189d2d8b71def4e2fee34f10b.tar.bz2
Issue #28676: merge from 3.5
-rw-r--r--Misc/NEWS6
-rw-r--r--Python/random.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 73247ee..59785c3 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -68,6 +68,12 @@ Tests
- Issue #23839: Various caches now are cleared before running every test file.
+Build
+-----
+
+- Issue #28676: Prevent missing 'getentropy' declaration warning on macOS.
+ Patch by Gareth Rees.
+
What's New in Python 3.6.0 beta 3
=================================
diff --git a/Python/random.c b/Python/random.c
index 6f9f711..46e3bb5 100644
--- a/Python/random.c
+++ b/Python/random.c
@@ -12,9 +12,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