commit 1c9fd1b90f875fbbf6d3f6f2c1a69fa7ce029210
parent 01ea7c780537abb714a4ec02a9d78a5502787046
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Sun, 12 Mar 2017 22:37:29 +0300
Fixed non-portable changes in 91548850d961783a8f5b288c69ce83ecb89d3ddc
Fixed waiting for empty fd_sets in test_empty_response.c and test_https_get_select.c
Diffstat:
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/src/testcurl/https/test_empty_response.c b/src/testcurl/https/test_empty_response.c
@@ -149,10 +149,15 @@ testInternalSelectGet ()
}
tv.tv_sec = 0;
tv.tv_usec = 1000;
- if (-1 == select (maxposixs + 1, &rs, &ws, &es, &tv))
+ if (-1 != maxposixs)
{
- if (EINTR != errno)
- abort ();
+ if (-1 == select (maxposixs + 1, &rs, &ws, &es, &tv))
+ {
+#ifdef MHD_POSIX_SOCKETS
+ if (EINTR != errno)
+#endif /* MHD_POSIX_SOCKETS */
+ abort ();
+ }
}
curl_multi_perform (multi, &running);
if (running == 0)
diff --git a/src/testcurl/https/test_https_get_select.c b/src/testcurl/https/test_https_get_select.c
@@ -175,10 +175,15 @@ testExternalGet (int flags)
}
tv.tv_sec = 0;
tv.tv_usec = 1000;
- if (-1 == select (maxposixs + 1, &rs, &ws, &es, &tv))
+ if (-1 != maxposixs)
{
- if (EINTR != errno)
- abort ();
+ if (-1 == select (maxposixs + 1, &rs, &ws, &es, &tv))
+ {
+#ifdef MHD_POSIX_SOCKETS
+ if (EINTR != errno)
+#endif /* MHD_POSIX_SOCKETS */
+ abort ();
+ }
}
curl_multi_perform (multi, &running);
if (running == 0)