aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/first.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest/first.c')
-rw-r--r--tests/libtest/first.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/libtest/first.c b/tests/libtest/first.c
index a7f317355..fda1a7fb5 100644
--- a/tests/libtest/first.c
+++ b/tests/libtest/first.c
@@ -9,6 +9,21 @@ extern void curl_memlimit(int);
/* test is provided in the test code file */
int test(char *url);
+int select_test (int num_fds, fd_set *rd, fd_set *wr, fd_set *exc,
+ struct timeval *tv)
+{
+#ifdef WIN32
+ /* Winsock doesn't like no socket set in 'rd', 'wr' or 'exc'. This is
+ * case when 'num_fds <= 0. So sleep.
+ */
+ if (num_fds <= 0) {
+ Sleep(1000*tv->tv_sec + tv->tv_usec/1000);
+ return 0;
+ }
+#endif
+ return select(num_fds, rd, wr, exc, tv);
+}
+
char *arg2=NULL;
int main(int argc, char **argv)