X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnetwork.c;h=a2221e5b4661f8f5410cf2e701896ecbbd0b24a3;hb=7a36dbe8c81a2d7ea9cb7cf8379aaa7049d58930;hp=a33d06e0f8aaeaee6129420253be74063d84bebc;hpb=1bbb3846fb60e220721c7c29fb5ef214d99c2293;p=collectd.git diff --git a/src/network.c b/src/network.c index a33d06e0..a2221e5b 100644 --- a/src/network.c +++ b/src/network.c @@ -76,7 +76,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 @@ -508,7 +510,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);