From: Victor Stinner Date: Fri, 13 Dec 2024 12:13:49 +0000 (+0100) Subject: [3.12] gh-127906: Declare timeval struct in pytime.h on Windows (#127908) X-Git-Tag: v3.12.9~156 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c77bfd768f0d406f7fab42947dc06206111a3740;p=thirdparty%2FPython%2Fcpython.git [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 --- diff --git a/Include/cpython/pytime.h b/Include/cpython/pytime.h index 16d88d191e9e..46cc97bd7cfe 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