Skip to content

Instantly share code, notes, and snippets.

@orip
Created November 23, 2020 11:21
Show Gist options
  • Save orip/f12e2cead3e6e85022d2085f29377c9a to your computer and use it in GitHub Desktop.
Save orip/f12e2cead3e6e85022d2085f29377c9a to your computer and use it in GitHub Desktop.
Patch for Python 3.4.x for macos, based on https://bugs.python.org/issue28676
diff --git a/Python/random.c b/Python/random.c
index 93d300d..396041d 100644
--- a/Python/random.c
+++ b/Python/random.c
@@ -3,6 +3,9 @@
#include <windows.h>
#else
#include <fcntl.h>
+#if defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY)
+#include <sys/random.h>
+#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment