HAVE_INET_PTON is hardcoded to 1 in the official Windows build. Since we use autotools we need to make the check work on Windows. This makes socket.inet_ntop() and socket.inet_pton() available like with the official build.
18 lines
521 B
Diff
18 lines
521 B
Diff
--- Python-3.7.2/configure.ac.orig 2019-04-13 17:14:32.296998700 +0200
|
|
+++ Python-3.7.2/configure.ac 2019-04-13 17:27:16.307347800 +0200
|
|
@@ -4107,10 +4107,14 @@
|
|
|
|
AC_MSG_CHECKING(for inet_pton)
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
+#ifdef _WIN32
|
|
+#include <ws2tcpip.h>
|
|
+#else
|
|
#include <sys/types.h>
|
|
#include <sys/socket.h>
|
|
#include <netinet/in.h>
|
|
#include <arpa/inet.h>
|
|
+#endif
|
|
]], [[void* p = inet_pton]])],
|
|
[AC_DEFINE(HAVE_INET_PTON, 1, Define if you have the 'inet_pton' function.)
|
|
AC_MSG_RESULT(yes)],
|