diff options
author | sisyphus <sisyphus@cpan.org> | 2022-04-25 20:11:28 +1000 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-05-27 21:30:46 -0600 |
commit | 6249423c8a89bfe065bc102ef88d6d9e6528c006 (patch) | |
tree | ff08358cee16a61238faadf6e9588dd9fd45e857 /dist/IO | |
parent | a2c205b0c72e65d4a5181c368c14dfed866674ff (diff) | |
download | perl-6249423c8a89bfe065bc102ef88d6d9e6528c006.tar.gz |
Fix dist/IO/poll.h for mingw-w64 runtimes 9.0 and later
Diffstat (limited to 'dist/IO')
-rw-r--r-- | dist/IO/poll.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/dist/IO/poll.h b/dist/IO/poll.h index 08de2506cd..0b025c0ad2 100644 --- a/dist/IO/poll.h +++ b/dist/IO/poll.h @@ -10,7 +10,7 @@ #ifndef POLL_H # define POLL_H -#if (defined(HAS_POLL) && defined(I_POLL)) || defined(POLLWRBAND) +#if (defined(HAS_POLL) && defined(I_POLL)) || (defined(POLLWRBAND) && !defined(_WIN32)) # include <poll.h> #elif (defined(HAS_POLL) && defined(I_SYS_POLL)) # include <sys/poll.h> @@ -22,11 +22,16 @@ #define EMULATE_POLL_WITH_SELECT +#ifdef _WIN32 +# include <winsock2.h> +#endif + #ifdef poll # undef poll #endif #define poll Perl_my_poll +#if WINVER < 0x0600 typedef struct pollfd { int fd; short events; @@ -48,6 +53,8 @@ typedef struct pollfd { #define POLLHUP 0x0010 #define POLLNVAL 0x0020 +#endif + int poll (struct pollfd *, unsigned long, int); #ifndef HAS_POLL |