X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnetwork.c;h=551bd5cceea9bc07aba71720ea1d79cdda5226dd;hb=5b1d67d04e490d48dd72dbb9f84d1a74bfb9dcc1;hp=9fbba9622fd7fac39ef8ff56ea8fb33a1fc1a308;hpb=3bc1a46bebfa53ec0f0e12d6406ca126a3ad6bf3;p=collectd.git diff --git a/src/network.c b/src/network.c index 9fbba962..551bd5cc 100644 --- a/src/network.c +++ b/src/network.c @@ -77,7 +77,9 @@ /* Re enable deprecation warnings */ # pragma GCC diagnostic warning "-Wdeprecated-declarations" # endif +# if GCRYPT_VERSION_NUMBER < 0x010600 GCRY_THREAD_OPTION_PTHREAD_IMPL; +# endif #endif #ifndef IPV6_ADD_MEMBERSHIP @@ -511,7 +513,9 @@ static void network_init_gcrypt (void) /* {{{ */ * above doesn't count, as it doesn't implicitly initalize Libgcrypt. * * tl;dr: keep all these gry_* statements in this exact order please. */ +# if GCRYPT_VERSION_NUMBER < 0x010600 gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); +# endif gcry_check_version (NULL); gcry_control (GCRYCTL_INIT_SECMEM, 32768); gcry_control (GCRYCTL_INITIALIZATION_FINISHED);