From: Ned Deily Date: Sat, 12 Nov 2016 21:34:25 +0000 (-0500) Subject: Issue #28676: Prevent missing 'getentropy' declaration warning on macOS. X-Git-Tag: v2.7.13rc1~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=09231e657aeaea64ca425a387791c6fa09070221;p=python Issue #28676: Prevent missing 'getentropy' declaration warning on macOS. Initial patch by Gareth Rees. --- diff --git a/Misc/NEWS b/Misc/NEWS index 3834e38656..f4c97b689f 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -295,6 +295,9 @@ Build - Issue #27806: Fix 32-bit builds on macOS Sierra 10.12 broken by removal of deprecated QuickTime/QuickTime.h header file. Patch by Aleks Bunin. +- Issue #28676: Prevent missing 'getentropy' declaration warning on macOS. + Initial patch by Gareth Rees. + Tools/Demos ----------- diff --git a/Python/random.c b/Python/random.c index b4bc1f37ab..2f83b5d087 100644 --- a/Python/random.c +++ b/Python/random.c @@ -3,6 +3,9 @@ #include #else #include +#if defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY) +#include +#endif #endif #ifdef Py_DEBUG