From: Ned Deily Date: Sat, 12 Nov 2016 21:35:48 +0000 (-0500) Subject: Issue #28676: Prevent missing 'getentropy' declaration warning on macOS. X-Git-Tag: v3.6.0b4~95^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7ae411264933bfc845c3647cde478508c7981ad3;p=thirdparty%2FPython%2Fcpython.git Issue #28676: Prevent missing 'getentropy' declaration warning on macOS. Patch by Gareth Rees. --- diff --git a/Misc/NEWS b/Misc/NEWS index 42cab9bac889..989fa4446af9 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -597,6 +597,9 @@ Build - 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 index f2ada5f0d843..154f6f9684c1 100644 --- a/Python/random.c +++ b/Python/random.c @@ -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