summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Python/bootstrap_hash.c
diff options
context:
space:
mode:
authorshadchin <[email protected]>2026-02-03 21:59:07 +0300
committershadchin <[email protected]>2026-02-03 22:28:51 +0300
commitbce46f28de392862d5c6c3b185d844ee7c623be3 (patch)
tree424878b5b90144f98970ce4a2745990c77330ad2 /contrib/tools/python3/Python/bootstrap_hash.c
parent0e0ee9fa48ce9411b4038aa769493d22ff6c10a2 (diff)
Import Python 3.13.11
commit_hash:bbb53cefb159aa3e7afaa475fd19d5a03b66945f
Diffstat (limited to 'contrib/tools/python3/Python/bootstrap_hash.c')
-rw-r--r--contrib/tools/python3/Python/bootstrap_hash.c14
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