diff options
Diffstat (limited to 'contrib/tools/python3/Python/bootstrap_hash.c')
| -rw-r--r-- | contrib/tools/python3/Python/bootstrap_hash.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/contrib/tools/python3/Python/bootstrap_hash.c b/contrib/tools/python3/Python/bootstrap_hash.c index 587063ef1ab..92f2301a012 100644 --- a/contrib/tools/python3/Python/bootstrap_hash.c +++ b/contrib/tools/python3/Python/bootstrap_hash.c @@ -1,24 +1,28 @@ #include "Python.h" -#include "pycore_initconfig.h" #include "pycore_fileutils.h" // _Py_fstat_noraise() +#include "pycore_initconfig.h" +#include "pycore_pylifecycle.h" // _PyOS_URandomNonblock() #include "pycore_runtime.h" // _PyRuntime +#ifdef HAVE_UNISTD_H +# include <unistd.h> // close() +#endif #ifdef MS_WINDOWS # include <windows.h> # include <bcrypt.h> #else -# include <fcntl.h> +# include <fcntl.h> // O_RDONLY # ifdef HAVE_SYS_STAT_H # include <sys/stat.h> # endif # ifdef HAVE_LINUX_RANDOM_H -# include <linux/random.h> +# include <linux/random.h> // GRND_NONBLOCK # endif # if defined(HAVE_SYS_RANDOM_H) && (defined(HAVE_GETRANDOM) || defined(HAVE_GETENTROPY)) -# include <sys/random.h> +# include <sys/random.h> // getrandom() # endif # if !defined(HAVE_GETRANDOM) && defined(HAVE_GETRANDOM_SYSCALL) -# include <sys/syscall.h> +# include <sys/syscall.h> // SYS_getrandom # endif #endif |
