commit dab616259e454918a18ced8f37b60c530f218579
parent b468b54f7cbe7bcc9354a9ce4cca644cd79e94ce
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Sun, 12 Dec 2021 20:16:06 +0300
Fixed b468b54f7cbe7bcc9354a9ce4cca644cd79e94ce
Diffstat:
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/testcurl/test_timeout.c b/src/testcurl/test_timeout.c
@@ -32,13 +32,14 @@
#include <microhttpd.h>
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#ifdef HAVE_TIME_H
#include <time.h>
+#endif /* HAVE_TIME_H */
#include "mhd_has_in_name.h"
-#ifndef WINDOWS
-#include <unistd.h>
-#endif
-
/**
* Pause execution for specified number of milliseconds.
@@ -55,8 +56,6 @@ _MHD_sleep (uint32_t ms)
int num_retries = 0;
while (0 != nanosleep (&slp, &rmn))
{
- if (EINTR != errno)
- externalErrorExit ();
if (num_retries++ > 8)
break;
slp = rmn;