From 286831df3738f62e0b7aed3fa52f942e1fa0d0e6 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 13 Dec 2024 12:53:35 +0100 Subject: [PATCH] gh-127906: Declare timeval struct in pytime.h on Windows Fix the following MSVC compiler warning: include\cpython\pytime.h(192): warning C4115: 'timeval': named type definition in parentheses --- Include/cpython/pytime.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/cpython/pytime.h b/Include/cpython/pytime.h index 16d88d191e9e25..46cc97bd7cfec3 100644 --- a/Include/cpython/pytime.h +++ b/Include/cpython/pytime.h @@ -53,7 +53,7 @@ functions and constants extern "C" { #endif -#ifdef __clang__ +#if defined(__clang__) || defined(_MSC_VER) struct timeval; #endif