Skip to content

Commit 017a294

Browse files
committed
guard converter
1 parent b5850d3 commit 017a294

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Modules/posixmodule.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,12 +1544,7 @@ dir_fd_and_follow_symlinks_invalid(const char *function_name, int dir_fd,
15441544
return 0;
15451545
}
15461546

1547-
#ifdef MS_WINDOWS
1548-
typedef long long Py_off_t;
1549-
#else
1550-
typedef off_t Py_off_t;
1551-
#endif
1552-
1547+
#if defined(HAVE_WAITID)
15531548
static int
15541549
idtype_t_converter(PyObject *arg, void *addr)
15551550
{
@@ -1560,6 +1555,13 @@ idtype_t_converter(PyObject *arg, void *addr)
15601555
*((idtype_t *)addr) = (idtype_t)(value);
15611556
return 1;
15621557
}
1558+
#endif
1559+
1560+
#ifdef MS_WINDOWS
1561+
typedef long long Py_off_t;
1562+
#else
1563+
typedef off_t Py_off_t;
1564+
#endif
15631565

15641566
static int
15651567
Py_off_t_converter(PyObject *arg, void *addr)

0 commit comments

Comments
 (0)