Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 96e7b3d

Browse files
committed
The patch from weck does a better job than my original idea. Thanks!
1 parent ad32deb commit 96e7b3d

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Modules/socketmodule.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,7 @@ typedef size_t socklen_t;
285285
#endif
286286

287287
#ifndef HAVE_INET_PTON
288-
#if !(defined(_MSC_VER) && _MSC_VER>1499)
289-
/* Don't redefine inet_pton in VS2008 */
288+
#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN)
290289
int inet_pton(int af, const char *src, void *dst);
291290
const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
292291
#endif
@@ -4805,8 +4804,7 @@ init_socket(void)
48054804

48064805

48074806
#ifndef HAVE_INET_PTON
4808-
#if !(defined(_MSC_VER) && _MSC_VER>1499)
4809-
/* Don't redefine inet_pton in VS2008 */
4807+
#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN)
48104808

48114809
/* Simplistic emulation code for inet_pton that only works for IPv4 */
48124810
/* These are not exposed because they do not set errno properly */

0 commit comments

Comments
 (0)