X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbind.c;h=6e13a8be8964d83fa475af35ff9d03ecbbb253ed;hb=e35f3c5c634216860f14586a7d17232022d8b588;hp=3d46e51e043846cf160298973d391727f56b2371;hpb=307459f5a1d79ee373cf59c7c8a0824d325c43e3;p=collectd.git diff --git a/src/bind.c b/src/bind.c index 3d46e51e..6e13a8be 100644 --- a/src/bind.c +++ b/src/bind.c @@ -21,7 +21,11 @@ * Florian Forster **/ -#define _XOPEN_SOURCE 600 /* glibc2 needs this for strptime */ +#include "config.h" + +#ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE 600 /* glibc2 needs this for strptime */ +#endif #include "collectd.h" #include "common.h" @@ -1378,10 +1382,12 @@ static int bind_init (void) /* {{{ */ return (-1); } + curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1); curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, bind_curl_callback); curl_easy_setopt (curl, CURLOPT_USERAGENT, PACKAGE_NAME"/"PACKAGE_VERSION); curl_easy_setopt (curl, CURLOPT_ERRORBUFFER, bind_curl_error); curl_easy_setopt (curl, CURLOPT_URL, (url != NULL) ? url : BIND_DEFAULT_URL); + curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1); return (0); } /* }}} int bind_init */