changeset: 105078:0efd48d4c47c branch: 3.5 parent: 105073:61b419b77752 user: Ned Deily date: Sat Nov 12 16:35:48 2016 -0500 files: Misc/NEWS Python/random.c description: Issue #28676: Prevent missing 'getentropy' declaration warning on macOS. Patch by Gareth Rees. diff -r 61b419b77752 -r 0efd48d4c47c Misc/NEWS --- a/Misc/NEWS Sat Nov 12 22:47:16 2016 +0200 +++ b/Misc/NEWS Sat Nov 12 16:35:48 2016 -0500 @@ -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 -r 61b419b77752 -r 0efd48d4c47c Python/random.c --- a/Python/random.c Sat Nov 12 22:47:16 2016 +0200 +++ b/Python/random.c Sat Nov 12 16:35:48 2016 -0500 @@ -9,9 +9,10 @@ # ifdef HAVE_LINUX_RANDOM_H # include # endif -# ifdef HAVE_GETRANDOM +# if defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY) # include -# elif defined(HAVE_GETRANDOM_SYSCALL) +# endif +# if !defined(HAVE_GETRANDOM) && defined(HAVE_GETRANDOM_SYSCALL) # include # endif #endif