From 8c4d3f23ab64a9c57dff59c6afd58c76d682afcf Mon Sep 17 00:00:00 2001 From: manojampalam Date: Sun, 3 Apr 2016 20:04:43 -0700 Subject: [PATCH] Disabling error on exceptfds to support and fixing select timeout --- contrib/win32/win32compat/w32fd.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/contrib/win32/win32compat/w32fd.c b/contrib/win32/win32compat/w32fd.c index da5d813..03082cb 100644 --- a/contrib/win32/win32compat/w32fd.c +++ b/contrib/win32/win32compat/w32fd.c @@ -517,7 +517,7 @@ w32_select(int fds, w32_fd_set* readfds, w32_fd_set* writefds, w32_fd_set* excep memset(&write_ready_fds, 0, sizeof(w32_fd_set)); if (timeout) - timeout_ms = timeout->tv_sec * 100 + timeout->tv_usec / 1000; + timeout_ms = timeout->tv_sec * 1000 + timeout->tv_usec / 1000; if (fds > MAX_FDS) { errno = EINVAL; @@ -531,12 +531,13 @@ w32_select(int fds, w32_fd_set* readfds, w32_fd_set* writefds, w32_fd_set* excep return -1; } - if (exceptfds) { - errno = EOPNOTSUPP; - debug("select - ERROR: exceptfds not supported"); - DebugBreak(); - return -1; - } + /* TODO - see if this needs to be supported */ + //if (exceptfds) { + // errno = EOPNOTSUPP; + // debug("select - ERROR: exceptfds not supported"); + // DebugBreak(); + // return -1; + //} if (readfds) { for (i = 0; i < fds; i++)