Skip to content
Snippets Groups Projects
Commit d10e174f authored by Gisle Vanem's avatar Gisle Vanem
Browse files

Some compilers lacks <sys/time.h>. Include "timeval.h" to simplify the #ifdefs.

parent e994c6af
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,6 @@
#include "test.h"
#include <sys/time.h>
#include <sys/types.h>
#include "timeval.h"
......@@ -83,7 +82,7 @@ int test(char *URL)
interval.tv_sec = 1;
interval.tv_usec = 0;
if (curlx_tvdiff(curlx_tvnow(), ml_start) >
if (curlx_tvdiff(curlx_tvnow(), ml_start) >
MAIN_LOOP_HANG_TIMEOUT) {
ml_timedout = TRUE;
break;
......@@ -93,7 +92,7 @@ int test(char *URL)
while (res == CURLM_CALL_MULTI_PERFORM) {
res = (int)curl_multi_perform(m, &running);
if (curlx_tvdiff(curlx_tvnow(), mp_start) >
if (curlx_tvdiff(curlx_tvnow(), mp_start) >
MULTI_PERFORM_HANG_TIMEOUT) {
mp_timedout = TRUE;
break;
......
......@@ -10,7 +10,6 @@
#include "test.h"
#include <sys/time.h>
#include <sys/types.h>
#include "timeval.h"
......@@ -83,7 +82,7 @@ int test(char *URL)
interval.tv_sec = 1;
interval.tv_usec = 0;
if (curlx_tvdiff(curlx_tvnow(), ml_start) >
if (curlx_tvdiff(curlx_tvnow(), ml_start) >
MAIN_LOOP_HANG_TIMEOUT) {
ml_timedout = TRUE;
break;
......@@ -97,7 +96,7 @@ int test(char *URL)
while (res == CURLM_CALL_MULTI_PERFORM) {
res = curl_multi_perform(m, &running);
if (curlx_tvdiff(curlx_tvnow(), mp_start) >
if (curlx_tvdiff(curlx_tvnow(), mp_start) >
MULTI_PERFORM_HANG_TIMEOUT) {
mp_timedout = TRUE;
break;
......
......@@ -12,7 +12,6 @@
#ifdef USE_SSLEAY
#include <sys/time.h>
#include <sys/types.h>
#include <openssl/opensslv.h>
......@@ -33,7 +32,7 @@
#define MAIN_LOOP_HANG_TIMEOUT 30 * 1000
#define MULTI_PERFORM_HANG_TIMEOUT 20 * 1000
/*
/*
* We use this ZERO_NULL to avoid picky compiler warnings,
* when assigning a NULL pointer to a function pointer var.
*/
......@@ -259,7 +258,7 @@ int test(char *URL)
interval.tv_sec = 1;
interval.tv_usec = 0;
if (curlx_tvdiff(curlx_tvnow(), ml_start) >
if (curlx_tvdiff(curlx_tvnow(), ml_start) >
MAIN_LOOP_HANG_TIMEOUT) {
ml_timedout = TRUE;
break;
......@@ -269,7 +268,7 @@ int test(char *URL)
while (res == CURLM_CALL_MULTI_PERFORM) {
res = curl_multi_perform(multi, &running);
if (curlx_tvdiff(curlx_tvnow(), mp_start) >
if (curlx_tvdiff(curlx_tvnow(), mp_start) >
MULTI_PERFORM_HANG_TIMEOUT) {
mp_timedout = TRUE;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment