diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c index fd70242e9e..beb9545af1 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1828,8 +1828,17 @@ myselect (int nfds, fd_set *rd, fd_set *wr, fd_set *ex, if (!NtSocketsInitialized++) { StartSockets(); } - if ((r = select (nfds, rd, wr, ex, timeout)) == SOCKET_ERROR) + if ((r = select (nfds, rd, wr, ex, timeout)) == SOCKET_ERROR) { errno = WSAGetLastError(); + switch (errno) { + case WSAEINTR: + errno = EINTR; + break; + case WSAENOTSOCK: + errno = EBADF; + break; + } + } return r; } |