Skip to content

Commit d963436

Browse files
authored
gh-134771: Fix time_clockid_converter() on Cygwin (#134772)
Use long for clockid_t instead of int.
1 parent f49a07b commit d963436

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The ``time_clockid_converter()`` function now selects correct type for
2+
``clockid_t`` on Cygwin which fixes a build error.

Modules/timemodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ time_clockid_converter(PyObject *obj, clockid_t *p)
187187
{
188188
#ifdef _AIX
189189
long long clk_id = PyLong_AsLongLong(obj);
190-
#elif defined(__DragonFly__)
190+
#elif defined(__DragonFly__) || defined(__CYGWIN__)
191191
long clk_id = PyLong_AsLong(obj);
192192
#else
193193
int clk_id = PyLong_AsInt(obj);

0 commit comments

Comments
 (0)