gh-134771: Fix time_clockid_converter() on Cygwin (#134772)

Use long for clockid_t instead of int.
This commit is contained in:
Collin Funk 2025-05-29 10:35:53 -07:00 committed by GitHub
parent f49a07b531
commit d96343679f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
The ``time_clockid_converter()`` function now selects correct type for
``clockid_t`` on Cygwin which fixes a build error.

View file

@ -187,7 +187,7 @@ time_clockid_converter(PyObject *obj, clockid_t *p)
{
#ifdef _AIX
long long clk_id = PyLong_AsLongLong(obj);
#elif defined(__DragonFly__)
#elif defined(__DragonFly__) || defined(__CYGWIN__)
long clk_id = PyLong_AsLong(obj);
#else
int clk_id = PyLong_AsInt(obj);