From c00086f8e282e4a3f17f6ce2660bbb9c97b037b9 Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Wed, 3 Sep 2025 00:02:49 +0300 Subject: [PATCH 147/N] Fix timeval declaration --- Include/internal/pycore_time.h | 2 +- Python/pytime.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Include/internal/pycore_time.h b/Include/internal/pycore_time.h index 3cfd192..205ac5d 100644 --- a/Include/internal/pycore_time.h +++ b/Include/internal/pycore_time.h @@ -58,7 +58,7 @@ extern "C" { #endif -#if defined(__clang__) || defined(__MINGW32__) +#ifdef __clang__ struct timeval; #endif diff --git a/Python/pytime.c b/Python/pytime.c index 560aea3..f4b6a7a 100644 --- a/Python/pytime.c +++ b/Python/pytime.c @@ -1,5 +1,4 @@ #include "Python.h" -#include "pycore_time.h" // PyTime_t #include // gmtime_r() #ifdef HAVE_SYS_TIME_H @@ -9,6 +8,8 @@ # include // struct timeval #endif +#include "pycore_time.h" // PyTime_t + #if defined(__APPLE__) # include // mach_absolute_time(), mach_timebase_info()