diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-09-14 10:55:07 +0000 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-09-14 10:55:07 +0000 |
commit | 0914e73c6c22810a001fe81c1f00663f60c10fc7 (patch) | |
tree | 33db7dea819ce7e1d61e5c25e66bae819b76dc56 | |
parent | 0396eb2fc2815434ff0761b0b5d696029fbe36ef (diff) |
mhd_sockets: fix on W32 system select() wrapper macro to support NULL pointer for timeval.
-rw-r--r-- | src/microhttpd/mhd_sockets.h | 5 |
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 @@ ( ( (((void*)(r) == (void*)0) || ((fd_set*)(r))->fd_count == 0) && \ (((void*)(w) == (void*)0) || ((fd_set*)(w))->fd_count == 0) && \ (((void*)(e) == (void*)0) || ((fd_set*)(e))->fd_count == 0) ) ? \ - ( ((void*)(t) == (void*)0) ? \ - (Sleep((t)->tv_sec * 1000 + (t)->tv_usec / 1000), 0) : 0 ) : \ + ( ((void*)(t) == (void*)0) ? 0 : \ + (Sleep(((struct timeval*)(t))->tv_sec * 1000 + \ + ((struct timeval*)(t))->tv_usec / 1000), 0) ) : \ (select((int)0,(r),(w),(e),(t))) ) #endif |