From efca5b4065a93f1765d3d0c13b26652e64dfd9c4 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Mon, 7 Jun 2021 19:54:07 +0530 Subject: [PATCH 1/2] IO: Include winsock.h for pollfd in Win32 platform. --- dist/IO/poll.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/IO/poll.h b/dist/IO/poll.h index 08de2506cdb2..84c42e8f7294 100644 --- a/dist/IO/poll.h +++ b/dist/IO/poll.h @@ -11,7 +11,11 @@ # define POLL_H #if (defined(HAS_POLL) && defined(I_POLL)) || defined(POLLWRBAND) -# include +# ifdef _WIN32 +# include +# else +# include +# endif #elif (defined(HAS_POLL) && defined(I_SYS_POLL)) # include #else From 0bdb27ca534cf3b70c632e710943f14fba907013 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Mon, 7 Jun 2021 19:54:39 +0530 Subject: [PATCH 2/2] win32: Use inet_ntop and inet_pton from Win32 system. --- win32/config.gc | 6 +++--- win32/config.vc | 6 +++--- win32/config_H.gc | 6 +++--- win32/config_H.vc | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/win32/config.gc b/win32/config.gc index af6fed92fbea..ea3622dbe8f7 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -305,8 +305,8 @@ d_ilogbl='define' d_inc_version_list='undef' d_index='undef' d_inetaton='undef' -d_inetntop='undef' -d_inetpton='undef' +d_inetntop='define' +d_inetpton='define' d_int64_t='undef' d_ip_mreq='undef' d_ip_mreq_source='undef' @@ -526,7 +526,7 @@ d_sigsetjmp='undef' d_sin6_scope_id='define' d_sitearch='define' d_snprintf='define' -d_sockaddr_in6='undef' +d_sockaddr_in6='define' d_sockaddr_sa_len='undef' d_sockaddr_storage='define' d_sockatmark='undef' diff --git a/win32/config.vc b/win32/config.vc index f4625bf2a4b9..9b639bafffcf 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -305,8 +305,8 @@ d_ilogbl='undef' d_inc_version_list='undef' d_index='undef' d_inetaton='undef' -d_inetntop='undef' -d_inetpton='undef' +d_inetntop='define' +d_inetpton='define' d_int64_t='undef' d_ip_mreq='undef' d_ip_mreq_source='undef' @@ -526,7 +526,7 @@ d_sigsetjmp='undef' d_sin6_scope_id='define' d_sitearch='define' d_snprintf='define' -d_sockaddr_in6='undef' +d_sockaddr_in6='define' d_sockaddr_sa_len='undef' d_sockaddr_storage='define' d_sockatmark='undef' diff --git a/win32/config_H.gc b/win32/config_H.gc index 4d605b193d60..b368eb9cb4c8 100644 --- a/win32/config_H.gc +++ b/win32/config_H.gc @@ -1938,7 +1938,7 @@ #define HAS_SOCKET /**/ /*#define HAS_SOCKETPAIR / **/ /*#define HAS_SOCKADDR_SA_LEN / **/ -/*#define HAS_SOCKADDR_IN6 / **/ +#define HAS_SOCKADDR_IN6 / **/ #define HAS_SOCKADDR_STORAGE /**/ #define HAS_SIN6_SCOPE_ID /**/ /*#define HAS_IP_MREQ / **/ @@ -2777,13 +2777,13 @@ * This symbol, if defined, indicates that the inet_ntop() function * is available to parse IPv4 and IPv6 strings. */ -/*#define HAS_INETNTOP / **/ +#define HAS_INETNTOP / **/ /* HAS_INETPTON: * This symbol, if defined, indicates that the inet_pton() function * is available to parse IPv4 and IPv6 strings. */ -/*#define HAS_INETPTON / **/ +#define HAS_INETPTON / **/ /* HAS_INT64_T: * This symbol will defined if the C compiler supports int64_t. diff --git a/win32/config_H.vc b/win32/config_H.vc index 2162287f1449..baaa7c432879 100644 --- a/win32/config_H.vc +++ b/win32/config_H.vc @@ -1938,7 +1938,7 @@ #define HAS_SOCKET /**/ /*#define HAS_SOCKETPAIR / **/ /*#define HAS_SOCKADDR_SA_LEN / **/ -/*#define HAS_SOCKADDR_IN6 / **/ +#define HAS_SOCKADDR_IN6 / **/ #define HAS_SOCKADDR_STORAGE /**/ #define HAS_SIN6_SCOPE_ID /**/ /*#define HAS_IP_MREQ / **/ @@ -2777,13 +2777,13 @@ * This symbol, if defined, indicates that the inet_ntop() function * is available to parse IPv4 and IPv6 strings. */ -/*#define HAS_INETNTOP / **/ +#define HAS_INETNTOP / **/ /* HAS_INETPTON: * This symbol, if defined, indicates that the inet_pton() function * is available to parse IPv4 and IPv6 strings. */ -/*#define HAS_INETPTON / **/ +#define HAS_INETPTON / **/ /* HAS_INT64_T: * This symbol will defined if the C compiler supports int64_t.