From 09231e657aeaea64ca425a387791c6fa09070221 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sat, 12 Nov 2016 16:34:25 -0500 Subject: [PATCH] Issue #28676: Prevent missing 'getentropy' declaration warning on macOS. Initial patch by Gareth Rees. --- Misc/NEWS | 3 +++ Python/random.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index 3834e3865693..f4c97b689f7d 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 b4bc1f37ab8c..2f83b5d087d5 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 -- 2.47.3