From c77bfd768f0d406f7fab42947dc06206111a3740 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 13 Dec 2024 13:13:49 +0100 Subject: [PATCH] [3.12] gh-127906: Declare timeval struct in pytime.h on Windows (#127908) 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