From: Collin Funk Date: Thu, 29 May 2025 17:35:53 +0000 (-0700) Subject: gh-134771: Fix time_clockid_converter() on Cygwin (#134772) X-Git-Tag: v3.15.0a1~1459 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d96343679fd6137c9d87d1bb120228b162ea0f8c;p=thirdparty%2FPython%2Fcpython.git gh-134771: Fix time_clockid_converter() on Cygwin (#134772) Use long for clockid_t instead of int. --- diff --git a/Misc/NEWS.d/next/Library/2025-05-26-22-18-32.gh-issue-134771.RKXpLT.rst b/Misc/NEWS.d/next/Library/2025-05-26-22-18-32.gh-issue-134771.RKXpLT.rst new file mode 100644 index 000000000000..4b70c6ef3987 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-05-26-22-18-32.gh-issue-134771.RKXpLT.rst @@ -0,0 +1,2 @@ +The ``time_clockid_converter()`` function now selects correct type for +``clockid_t`` on Cygwin which fixes a build error. diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 1bfbf3f6a0b9..3271d87ddc27 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -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);