summaryrefslogtreecommitdiffstats
path: root/lib/asyn-ares.c
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@lists.haxx.se>2022-04-27 06:11:01 (GMT)
committerBrad King <brad.king@kitware.com>2022-04-28 19:15:44 (GMT)
commit2a9bc9ebf09fbafa5378d143083434204e9f233e (patch)
treed55420489c10068efaa694b96db2f735539b4339 /lib/asyn-ares.c
parenta1f6ec647cfab8d613897562f8ee5f81a8f6b68d (diff)
downloadCMake-2a9bc9ebf09fbafa5378d143083434204e9f233e.zip
CMake-2a9bc9ebf09fbafa5378d143083434204e9f233e.tar.gz
CMake-2a9bc9ebf09fbafa5378d143083434204e9f233e.tar.bz2
curl 2022-04-27 (1669b17d)
Code extracted from: https://github.com/curl/curl.git at commit 1669b17d3a1a1fd824308544ca0ec02a2a4f50ea (curl-7_83_0).
Diffstat (limited to 'lib/asyn-ares.c')
-rw-r--r--lib/asyn-ares.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
index fd0bb6c..c885ade 100644
--- a/lib/asyn-ares.c
+++ b/lib/asyn-ares.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -65,6 +65,7 @@
#include "connect.h"
#include "select.h"
#include "progress.h"
+#include "timediff.h"
# if defined(CURL_STATICLIB) && !defined(CARES_STATICLIB) && \
defined(WIN32)
@@ -290,7 +291,7 @@ int Curl_resolver_getsock(struct Curl_easy *data,
timeout = ares_timeout((ares_channel)data->state.async.resolver, &maxtime,
&timebuf);
- milli = (timeout->tv_sec * 1000) + (timeout->tv_usec/1000);
+ milli = (long)curlx_tvtoms(timeout);
if(milli == 0)
milli += 10;
Curl_expire(data, milli, EXPIRE_ASYNC_NAME);