]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-127906: Declare timeval struct in pytime.h on Windows (#127908)
authorVictor Stinner <vstinner@python.org>
Fri, 13 Dec 2024 12:13:49 +0000 (13:13 +0100)
committerGitHub <noreply@github.com>
Fri, 13 Dec 2024 12:13:49 +0000 (12:13 +0000)
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

index 16d88d191e9e2520ee8e3beb4e1ececa3eba976f..46cc97bd7cfec321f6ef908296608f01ef28ceed 100644 (file)
@@ -53,7 +53,7 @@ functions and constants
 extern "C" {
 #endif
 
-#ifdef __clang__
+#if defined(__clang__) || defined(_MSC_VER)
 struct timeval;
 #endif