1 https://github.com/python/cpython/commit/50e86033de85294d87b7e942701d456342abde8e
3 diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
4 index e8c15a9473c..5c739180ea6 100644
5 --- a/Modules/posixmodule.c
6 +++ b/Modules/posixmodule.c
7 @@ -1927,14 +1927,8 @@ _pystat_fromstructstat(STRUCT_STAT *st)
10 PyStructSequence_SET_ITEM(v, 0, PyLong_FromLong((long)st->st_mode));
11 -#if defined(HAVE_LARGEFILE_SUPPORT) || defined(MS_WINDOWS)
12 Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(st->st_ino));
13 - PyStructSequence_SET_ITEM(v, 1,
14 - PyLong_FromUnsignedLongLong(st->st_ino));
16 - Py_BUILD_ASSERT(sizeof(unsigned long) >= sizeof(st->st_ino));
17 - PyStructSequence_SET_ITEM(v, 1, PyLong_FromUnsignedLong(st->st_ino));
19 + PyStructSequence_SET_ITEM(v, 1, PyLong_FromUnsignedLongLong(st->st_ino));
21 PyStructSequence_SET_ITEM(v, 2, PyLong_FromUnsignedLong(st->st_dev));
23 @@ -1948,12 +1942,8 @@ _pystat_fromstructstat(STRUCT_STAT *st)
24 PyStructSequence_SET_ITEM(v, 4, _PyLong_FromUid(st->st_uid));
25 PyStructSequence_SET_ITEM(v, 5, _PyLong_FromGid(st->st_gid));
27 -#ifdef HAVE_LARGEFILE_SUPPORT
28 - PyStructSequence_SET_ITEM(v, 6,
29 - PyLong_FromLongLong((long long)st->st_size));
31 - PyStructSequence_SET_ITEM(v, 6, PyLong_FromLong(st->st_size));
33 + Py_BUILD_ASSERT(sizeof(long long) >= sizeof(st->st_size));
34 + PyStructSequence_SET_ITEM(v, 6, PyLong_FromLongLong(st->st_size));
36 #if defined(HAVE_STAT_TV_NSEC)
37 ansec = st->st_atim.tv_nsec;
38 @@ -11451,11 +11441,8 @@ os_DirEntry_inode_impl(DirEntry *self)
39 Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(self->win32_file_index));
40 return PyLong_FromUnsignedLongLong(self->win32_file_index);
42 -#ifdef HAVE_LARGEFILE_SUPPORT
43 - return PyLong_FromLongLong((long long)self->d_ino);
45 - return PyLong_FromLong((long)self->d_ino);
47 + Py_BUILD_ASSERT(sizeof(unsigned long long) >= sizeof(self->d_ino));
48 + return PyLong_FromUnsignedLongLong(self->d_ino);