From: Christian Heimes Date: Tue, 20 Nov 2007 06:51:17 +0000 (+0000) Subject: The patch from weck does a better job than my original idea. Thanks! X-Git-Tag: v3.0a2~142 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=96e7b3db657e17f90b1569018942f5c7371832c8;p=python The patch from weck does a better job than my original idea. Thanks! --- diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index f5ad292865..9f312ea965 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -285,8 +285,7 @@ typedef size_t socklen_t; #endif #ifndef HAVE_INET_PTON -#if !(defined(_MSC_VER) && _MSC_VER>1499) -/* Don't redefine inet_pton in VS2008 */ +#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN) int inet_pton(int af, const char *src, void *dst); const char *inet_ntop(int af, const void *src, char *dst, socklen_t size); #endif @@ -4805,8 +4804,7 @@ init_socket(void) #ifndef HAVE_INET_PTON -#if !(defined(_MSC_VER) && _MSC_VER>1499) -/* Don't redefine inet_pton in VS2008 */ +#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN) /* Simplistic emulation code for inet_pton that only works for IPv4 */ /* These are not exposed because they do not set errno properly */