[Python-checkins] cpython (3.5): Issue #28676: Prevent missing 'getentropy' declaration warning on macOS.
ned.deily
python-checkins at python.org
Sat Nov 12 16:40:38 EST 2016
https://hg.python.org/cpython/rev/0efd48d4c47c
changeset: 105078:0efd48d4c47c
branch: 3.5
parent: 105073:61b419b77752
user: Ned Deily <nad at python.org>
date: Sat Nov 12 16:35:48 2016 -0500
summary:
Issue #28676: Prevent missing 'getentropy' declaration warning on macOS.
Patch by Gareth Rees.
files:
Misc/NEWS | 3 +++
Python/random.c | 5 +++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -597,6 +597,9 @@
- Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X.
Also update FreedBSD version checks for the original ctype UTF-8 workaround.
+- Issue #28676: Prevent missing 'getentropy' declaration warning on macOS.
+ Patch by Gareth Rees.
+
What's New in Python 3.5.2?
===========================
diff --git a/Python/random.c b/Python/random.c
--- 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
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list