diff options
Diffstat (limited to 'main/network.c')
-rw-r--r-- | main/network.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/network.c b/main/network.c index 7a066392d8..e5d2f595bc 100644 --- a/main/network.c +++ b/main/network.c @@ -1147,7 +1147,10 @@ PHPAPI int php_poll2(php_pollfd *ufds, unsigned int nfds, int timeout) tv.tv_sec = timeout / 1000; tv.tv_usec = (timeout - (tv.tv_sec * 1000)) * 1000; } -#ifndef PHP_WIN32 +/* Reseting/initializing */ +#ifdef PHP_WIN32 + WSASetLastError(0); +#else errno = 0; #endif n = select(max_fd + 1, &rset, &wset, &eset, timeout >= 0 ? &tv : NULL); |