|
| 1 | +From 11c0968b321f527a61803b68c4b1cb05e2bb78e5 Mon Sep 17 00:00:00 2001 |
| 2 | +From: sisyphus < [email protected]> |
| 3 | +Date: Mon, 25 Apr 2022 20:11:28 +1000 |
| 4 | +Subject: [PATCH 1/3] Fix dist/IO/poll.h for mingw-w64 runtimes 9.0 and later |
| 5 | + |
| 6 | +--- |
| 7 | + dist/IO/poll.h | 9 ++++++++- |
| 8 | + 1 file changed, 8 insertions(+), 1 deletion(-) |
| 9 | + |
| 10 | +diff --git a/dist/IO/poll.h b/dist/IO/poll.h |
| 11 | +index 08de2506cdb2..0b025c0ad20d 100644 |
| 12 | +--- a/dist/IO/poll.h |
| 13 | ++++ b/dist/IO/poll.h |
| 14 | +@@ -10,7 +10,7 @@ |
| 15 | + #ifndef POLL_H |
| 16 | + # define POLL_H |
| 17 | + |
| 18 | +-#if (defined(HAS_POLL) && defined(I_POLL)) || defined(POLLWRBAND) |
| 19 | ++#if (defined(HAS_POLL) && defined(I_POLL)) || (defined(POLLWRBAND) && !defined(_WIN32)) |
| 20 | + # include <poll.h> |
| 21 | + #elif (defined(HAS_POLL) && defined(I_SYS_POLL)) |
| 22 | + # include <sys/poll.h> |
| 23 | +@@ -22,11 +22,16 @@ |
| 24 | + |
| 25 | + #define EMULATE_POLL_WITH_SELECT |
| 26 | + |
| 27 | ++#ifdef _WIN32 |
| 28 | ++# include <winsock2.h> |
| 29 | ++#endif |
| 30 | ++ |
| 31 | + #ifdef poll |
| 32 | + # undef poll |
| 33 | + #endif |
| 34 | + #define poll Perl_my_poll |
| 35 | + |
| 36 | ++#if WINVER < 0x0600 |
| 37 | + typedef struct pollfd { |
| 38 | + int fd; |
| 39 | + short events; |
| 40 | +@@ -48,6 +53,8 @@ typedef struct pollfd { |
| 41 | + #define POLLHUP 0x0010 |
| 42 | + #define POLLNVAL 0x0020 |
| 43 | + |
| 44 | ++#endif |
| 45 | ++ |
| 46 | + int poll (struct pollfd *, unsigned long, int); |
| 47 | + |
| 48 | + #ifndef HAS_POLL |
| 49 | + |
| 50 | +From baf5354a4ef7c7c9dc886e9f0eeaebc65833d25d Mon Sep 17 00:00:00 2001 |
| 51 | +From: sisyphus < [email protected]> |
| 52 | +Date: Mon, 25 Apr 2022 20:19:38 +1000 |
| 53 | +Subject: [PATCH 2/3] define d_inetntop and d_inetpton for mingw builds |
| 54 | + |
| 55 | +--- |
| 56 | + win32/config.gc | 4 ++-- |
| 57 | + 1 file changed, 2 insertions(+), 2 deletions(-) |
| 58 | + |
| 59 | +diff --git a/win32/config.gc b/win32/config.gc |
| 60 | +index 9d44768f64d1..6005e72bfa60 100644 |
| 61 | +--- a/win32/config.gc |
| 62 | ++++ b/win32/config.gc |
| 63 | +@@ -307,8 +307,8 @@ d_ilogbl='define' |
| 64 | + d_inc_version_list='undef' |
| 65 | + d_index='undef' |
| 66 | + d_inetaton='undef' |
| 67 | +-d_inetntop='undef' |
| 68 | +-d_inetpton='undef' |
| 69 | ++d_inetntop='define' |
| 70 | ++d_inetpton='define' |
| 71 | + d_int64_t='undef' |
| 72 | + d_ip_mreq='undef' |
| 73 | + d_ip_mreq_source='undef' |
| 74 | + |
| 75 | +From 75d119e39549ce67ed6c0c8fabfcb943f2187866 Mon Sep 17 00:00:00 2001 |
| 76 | +From: sisyphus < [email protected]> |
| 77 | +Date: Mon, 25 Apr 2022 20:22:23 +1000 |
| 78 | +Subject: [PATCH 3/3] define HAS_INETPTON and HAS_INETNTOP for mingw builds |
| 79 | + |
| 80 | +--- |
| 81 | + win32/config_H.gc | 4 ++-- |
| 82 | + 1 file changed, 2 insertions(+), 2 deletions(-) |
| 83 | + |
| 84 | +diff --git a/win32/config_H.gc b/win32/config_H.gc |
| 85 | +index 3644377b7973..2533efd05908 100644 |
| 86 | +--- a/win32/config_H.gc |
| 87 | ++++ b/win32/config_H.gc |
| 88 | +@@ -2809,13 +2809,13 @@ |
| 89 | + * This symbol, if defined, indicates that the inet_ntop() function |
| 90 | + * is available to parse IPv4 and IPv6 strings. |
| 91 | + */ |
| 92 | +-/*#define HAS_INETNTOP / **/ |
| 93 | ++#define HAS_INETNTOP /**/ |
| 94 | + |
| 95 | + /* HAS_INETPTON: |
| 96 | + * This symbol, if defined, indicates that the inet_pton() function |
| 97 | + * is available to parse IPv4 and IPv6 strings. |
| 98 | + */ |
| 99 | +-/*#define HAS_INETPTON / **/ |
| 100 | ++#define HAS_INETPTON /**/ |
| 101 | + |
| 102 | + /* HAS_INT64_T: |
| 103 | + * This symbol will defined if the C compiler supports int64_t. |
0 commit comments