https://github.com/python/cpython/commit/c77bfd768f0d406f7fab42947dc06206111a3740
commit: c77bfd768f0d406f7fab42947dc06206111a3740
branch: 3.12
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2024-12-13T12:13:49Z
summary:

[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

files:
M Include/cpython/pytime.h

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
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to