diff options
Diffstat (limited to 'src/microhttpd/mhd_sockets.h')
-rw-r--r-- | src/microhttpd/mhd_sockets.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/microhttpd/mhd_sockets.h b/src/microhttpd/mhd_sockets.h index b01134a9..acffaa57 100644 --- a/src/microhttpd/mhd_sockets.h +++ b/src/microhttpd/mhd_sockets.h | |||
@@ -209,11 +209,12 @@ | |||
209 | # define MHD_SYS_select_(n,r,w,e,t) select((n),(r),(w),(e),(t)) | 209 | # define MHD_SYS_select_(n,r,w,e,t) select((n),(r),(w),(e),(t)) |
210 | #else | 210 | #else |
211 | # define MHD_SYS_select_(n,r,w,e,t) \ | 211 | # define MHD_SYS_select_(n,r,w,e,t) \ |
212 | ( (!(r) || ((fd_set*)(r))->fd_count == 0) && \ | 212 | ( ( (((void*)(r) == (void*)0) || ((fd_set*)(r))->fd_count == 0) && \ |
213 | (!(w) || ((fd_set*)(w))->fd_count == 0) && \ | 213 | (((void*)(w) == (void*)0) || ((fd_set*)(w))->fd_count == 0) && \ |
214 | (!(e) || ((fd_set*)(e))->fd_count == 0) ) ? \ | 214 | (((void*)(e) == (void*)0) || ((fd_set*)(e))->fd_count == 0) ) ? \ |
215 | ( (t) ? (Sleep((t)->tv_sec * 1000 + (t)->tv_usec / 1000), 0) : 0 ) : \ | 215 | ( ((void*)(t) == (void*)0) ? \ |
216 | (select((int)0,(r),(w),(e),(t))) | 216 | (Sleep((t)->tv_sec * 1000 + (t)->tv_usec / 1000), 0) : 0 ) : \ |
217 | (select((int)0,(r),(w),(e),(t))) ) | ||
217 | #endif | 218 | #endif |
218 | 219 | ||
219 | #if defined(HAVE_POLL) | 220 | #if defined(HAVE_POLL) |