X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fnginx.c;h=69ec06dc996edc9452ea565776c9d9d70c241e68;hb=598a534ab6f2d122556434b82818c4b6ed8e48f9;hp=1c537a85e46e7ac80e1502f3647a9f29fa6bdd64;hpb=6466bdb79c1f36b9f2867b92605928ddc39d0605;p=collectd.git diff --git a/src/nginx.c b/src/nginx.c index 1c537a85..69ec06dc 100644 --- a/src/nginx.c +++ b/src/nginx.c @@ -181,15 +181,16 @@ static int init (void) 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); } /* void init */