libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 0914e73c6c22810a001fe81c1f00663f60c10fc7
parent 0396eb2fc2815434ff0761b0b5d696029fbe36ef
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Wed, 14 Sep 2016 10:55:07 +0000

mhd_sockets: fix on W32 system select() wrapper macro to support NULL pointer for timeval.

Diffstat:
Msrc/microhttpd/mhd_sockets.h | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 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