diff --git a/src/ascent.c b/src/ascent.c
index 501f294f7319960828a81909d6872f0146c69388..2ba3c772d5f9f8116f4100b6f3484756cfbb8ef7 100644 (file)
--- a/src/ascent.c
+++ b/src/ascent.c
if (cacert != NULL)
curl_easy_setopt (curl, CURLOPT_CAINFO, cacert);
+#ifdef HAVE_CURLOPT_TIMEOUT_MS
if (timeout != NULL)
curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS, atol(timeout));
else
- curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS,
- CDTIME_T_TO_MS(plugin_get_interval()));
+ curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS, (long) CDTIME_T_TO_MS(plugin_get_interval()));
+#endif
return (0);
} /* }}} int ascent_init */