X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FIO%2Fpoll.c;h=a09c2472a7625da8a00295bd33868340f4c2b853;hb=9d7debe1023b7931d135e515197539d2f69518ce;hp=5d806b60f3098ed6919b7a7e6557403f50e4f515;hpb=35ef477370235abeea305d760b3f316d7667ba3c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/IO/poll.c b/ext/IO/poll.c index 5d806b6..a09c247 100644 --- a/ext/IO/poll.c +++ b/ext/IO/poll.c @@ -5,8 +5,8 @@ * This program is free software; you can redistribute it and/or * modify it under the same terms as Perl itself. * - * For systems that do not have the poll() system call (for example Linux) - * try to emulate it as closely as possible using select() + * For systems that do not have the poll() system call (for example Linux + * kernels < v2.1.23) try to emulate it as closely as possible using select() * */ @@ -26,6 +26,12 @@ #include #include +#ifdef HAS_SELECT +#ifdef I_SYS_SELECT +#include +#endif +#endif + #ifdef EMULATE_POLL_WITH_SELECT # define POLL_CAN_READ (POLLIN | POLLRDNORM ) @@ -52,7 +58,7 @@ again: FD_ZERO(&wfd); FD_ZERO(&efd); - for(i = 0 ; i < nfds ; i++) { + for(i = 0 ; i < (int)nfds ; i++) { int events = fds[i].events; int fd = fds[i].fd; @@ -99,7 +105,7 @@ again: count = 0; - for(i = 0 ; i < nfds ; i++) { + for(i = 0 ; i < (int)nfds ; i++) { int revents = (fds[i].events & POLL_EVENTS_MASK); int fd = fds[i].fd;