[Python-checkins] bpo-40650: Include winsock2.h in pytime.c, instead of a full windows.h (GH-20137)

Minmin Gong webhook-mailer at python.org
Mon May 18 12:23:01 EDT 2020


https://github.com/python/cpython/commit/f660567937277cc3a2cd53af77bbb18e905427e8
commit: f660567937277cc3a2cd53af77bbb18e905427e8
branch: master
author: Minmin Gong <gongminmin at msn.com>
committer: GitHub <noreply at github.com>
date: 2020-05-18T17:22:53+01:00
summary:

bpo-40650: Include winsock2.h in pytime.c, instead of a full windows.h (GH-20137)

files:
A Misc/NEWS.d/next/Windows/2020-05-17-00-08-13.bpo-40650.4euMtU.rst
M Python/pytime.c

diff --git a/Misc/NEWS.d/next/Windows/2020-05-17-00-08-13.bpo-40650.4euMtU.rst b/Misc/NEWS.d/next/Windows/2020-05-17-00-08-13.bpo-40650.4euMtU.rst
new file mode 100644
index 0000000000000..db13e58b14a79
--- /dev/null
+++ b/Misc/NEWS.d/next/Windows/2020-05-17-00-08-13.bpo-40650.4euMtU.rst
@@ -0,0 +1 @@
+Include winsock2.h in pytime.c for timeval.
\ No newline at end of file
diff --git a/Python/pytime.c b/Python/pytime.c
index 6affccbeffa88..b121b432f428d 100644
--- a/Python/pytime.c
+++ b/Python/pytime.c
@@ -1,6 +1,6 @@
 #include "Python.h"
 #ifdef MS_WINDOWS
-#include <windows.h>
+#include <winsock2.h>         /* struct timeval */
 #endif
 
 #if defined(__APPLE__)



More information about the Python-checkins mailing list