aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2016-09-14 10:55:07 +0000
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2016-09-14 10:55:07 +0000
commit0914e73c6c22810a001fe81c1f00663f60c10fc7 (patch)
tree33db7dea819ce7e1d61e5c25e66bae819b76dc56
parent0396eb2fc2815434ff0761b0b5d696029fbe36ef (diff)
downloadlibmicrohttpd-0914e73c6c22810a001fe81c1f00663f60c10fc7.tar.gz
libmicrohttpd-0914e73c6c22810a001fe81c1f00663f60c10fc7.zip
mhd_sockets: fix on W32 system select() wrapper macro to support NULL pointer for timeval.
-rw-r--r--src/microhttpd/mhd_sockets.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/microhttpd/mhd_sockets.h b/src/microhttpd/mhd_sockets.h
index d13221bc..74f5be2d 100644
--- a/src/microhttpd/mhd_sockets.h
+++ b/src/microhttpd/mhd_sockets.h
@@ -259,8 +259,9 @@
259( ( (((void*)(r) == (void*)0) || ((fd_set*)(r))->fd_count == 0) && \ 259( ( (((void*)(r) == (void*)0) || ((fd_set*)(r))->fd_count == 0) && \
260 (((void*)(w) == (void*)0) || ((fd_set*)(w))->fd_count == 0) && \ 260 (((void*)(w) == (void*)0) || ((fd_set*)(w))->fd_count == 0) && \
261 (((void*)(e) == (void*)0) || ((fd_set*)(e))->fd_count == 0) ) ? \ 261 (((void*)(e) == (void*)0) || ((fd_set*)(e))->fd_count == 0) ) ? \
262 ( ((void*)(t) == (void*)0) ? \ 262 ( ((void*)(t) == (void*)0) ? 0 : \
263 (Sleep((t)->tv_sec * 1000 + (t)->tv_usec / 1000), 0) : 0 ) : \ 263 (Sleep(((struct timeval*)(t))->tv_sec * 1000 + \
264 ((struct timeval*)(t))->tv_usec / 1000), 0) ) : \
264 (select((int)0,(r),(w),(e),(t))) ) 265 (select((int)0,(r),(w),(e),(t))) )
265#endif 266#endif
266 267