summaryrefslogtreecommitdiff
path: root/Modules/socketmodule.h
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/socketmodule.h')
-rw-r--r--Modules/socketmodule.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
index b83f9af3bd..3cce927e0b 100644
--- a/Modules/socketmodule.h
+++ b/Modules/socketmodule.h
@@ -14,6 +14,13 @@
#else /* MS_WINDOWS */
# include <winsock2.h>
+/* Windows 'supports' CMSG_LEN, but does not follow the POSIX standard
+ * interface at all, so there is no point including the code that
+ * attempts to use it.
+ */
+# ifdef PySocket_BUILDING_SOCKET
+# undef CMSG_LEN
+# endif
# include <ws2tcpip.h>
/* VC6 is shipped with old platform headers, and does not have MSTcpIP.h
* Separate SDKs have all the functions we want, but older ones don't have
@@ -167,7 +174,7 @@ typedef struct {
PyObject *(*errorhandler)(void); /* Error handler; checks
errno, returns NULL and
sets a Python exception */
- double sock_timeout; /* Operation timeout in seconds;
+ _PyTime_t sock_timeout; /* Operation timeout in seconds;
0.0 means non-blocking */
} PySocketSockObject;