Skip to content

Commit 09231e6

Browse files
committed
Issue #28676: Prevent missing 'getentropy' declaration warning on macOS.
Initial patch by Gareth Rees.
1 parent 58b6b98 commit 09231e6

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,9 @@ Build
295295
- Issue #27806: Fix 32-bit builds on macOS Sierra 10.12 broken by removal of
296296
deprecated QuickTime/QuickTime.h header file. Patch by Aleks Bunin.
297297

298+
- Issue #28676: Prevent missing 'getentropy' declaration warning on macOS.
299+
Initial patch by Gareth Rees.
300+
298301
Tools/Demos
299302
-----------
300303

Python/random.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
#include <windows.h>
44
#else
55
#include <fcntl.h>
6+
#if defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY)
7+
#include <sys/random.h>
8+
#endif
69
#endif
710

811
#ifdef Py_DEBUG

0 commit comments

Comments
 (0)