]> granicus.if.org Git - python/commitdiff
Issue #28676: Prevent missing 'getentropy' declaration warning on macOS.
authorNed Deily <nad@python.org>
Sat, 12 Nov 2016 21:34:25 +0000 (16:34 -0500)
committerNed Deily <nad@python.org>
Sat, 12 Nov 2016 21:34:25 +0000 (16:34 -0500)
Initial patch by Gareth Rees.

Misc/NEWS
Python/random.c

index 3834e3865693489470722c173ce8347b60d2c00b..f4c97b689f7dfc0e68138ae88ff8a885042b0f64 100644 (file)
--- 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
 -----------
 
index b4bc1f37ab8c4ef862138708251dea6ccd99a400..2f83b5d087d5f5c7ee6a3b58dc818ba6025aa941 100644 (file)
@@ -3,6 +3,9 @@
 #include <windows.h>
 #else
 #include <fcntl.h>
+#if defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY)
+#include <sys/random.h>
+#endif
 #endif
 
 #ifdef Py_DEBUG