int r;
#ifdef USE_SOCKETS_AS_HANDLES
Perl_fd_set dummy;
- int i, fd;
+ int i, fd, save_errno;
FD_SET nrd, nwr, nex, *prd, *pwr, *pex;
/* winsock seems incapable of dealing with all three null fd_sets,
FD_SET(fd, &nex);
}
+ errno = save_errno;
SOCKET_TEST_ERROR(r = select(nfds, prd, pwr, pex, timeout));
+ save_errno = errno;
for (i = 0; i < nfds; i++) {
fd = TO_SOCKET(i);
if (PERL_FD_ISSET(i,ex) && !FD_ISSET(fd, &nex))
PERL_FD_CLR(i,ex);
}
+ errno = save_errno;
#else
SOCKET_TEST_ERROR(r = select(nfds, rd, wr, ex, timeout));
#endif