diff options
Diffstat (limited to 'src/testcurl/test_post_loop.c')
-rw-r--r-- | src/testcurl/test_post_loop.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c index dbfd170d..b4a22eb1 100644 --- a/src/testcurl/test_post_loop.c +++ b/src/testcurl/test_post_loop.c | |||
@@ -522,8 +522,12 @@ testExternalPost () | |||
522 | timeout64 = (uint64_t) ctimeout; | 522 | timeout64 = (uint64_t) ctimeout; |
523 | if (0 == running) | 523 | if (0 == running) |
524 | timeout64 = 0; /* terminate quickly... */ | 524 | timeout64 = 0; /* terminate quickly... */ |
525 | tv.tv_sec = timeout64 / 1000; | 525 | #if ! defined(_WIN32) || defined(__CYGWIN__) |
526 | tv.tv_usec = (timeout64 % 1000) * 1000; | 526 | tv.tv_sec = (time_t) (timeout64 / 1000); |
527 | #else /* Native W32 */ | ||
528 | tv.tv_sec = (long) (timeout64 / 1000); | ||
529 | #endif /* Native W32 */ | ||
530 | tv.tv_usec = (long) (1000 * (timeout64 % 1000)); | ||
527 | if (-1 == select (maxposixs + 1, &rs, &ws, &es, &tv)) | 531 | if (-1 == select (maxposixs + 1, &rs, &ws, &es, &tv)) |
528 | { | 532 | { |
529 | #ifdef MHD_POSIX_SOCKETS | 533 | #ifdef MHD_POSIX_SOCKETS |