diff options
Diffstat (limited to 'lib/select.c')
-rw-r--r-- | lib/select.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/select.c b/lib/select.c index da3082dda..1c6481cb7 100644 --- a/lib/select.c +++ b/lib/select.c @@ -39,6 +39,10 @@ #include <dos.h> /* delay() */ #endif +#ifdef __VXWORKS__ +#include <strings.h> /* bzero() in FD_SET */ +#endif + #include <curl/curl.h> #include "urldata.h" @@ -108,8 +112,10 @@ int Curl_wait_ms(int timeout_ms) if(error && error_not_EINTR) break; pending_ms = timeout_ms - elapsed_ms; - if(pending_ms <= 0) + if(pending_ms <= 0) { + r = 0; /* Simulate a "call timed out" case */ break; + } } while(r == -1); #endif /* USE_WINSOCK */ if(r) @@ -432,8 +438,10 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) break; if(timeout_ms > 0) { pending_ms = timeout_ms - elapsed_ms; - if(pending_ms <= 0) + if(pending_ms <= 0) { + r = 0; /* Simulate a "call timed out" case */ break; + } } } while(r == -1); @@ -517,8 +525,10 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) break; if(timeout_ms > 0) { pending_ms = timeout_ms - elapsed_ms; - if(pending_ms <= 0) + if(pending_ms <= 0) { + r = 0; /* Simulate a "call timed out" case */ break; + } } } while(r == -1); |