X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=inline;f=src%2Flibcollectdclient%2Fnetwork_buffer.c;h=61c7c22e2d7ab963a2d98977f8c0c3747ad18723;hb=1201bf3754e24957a9cb4ddaad0f6f2bd09b653c;hp=acbe93f51c050093ea3214819058049074542298;hpb=c7b0f0b0267f2ab7c84eea8306f0a516f5b8f769;p=collectd.git diff --git a/src/libcollectdclient/network_buffer.c b/src/libcollectdclient/network_buffer.c index acbe93f5..61c7c22e 100644 --- a/src/libcollectdclient/network_buffer.c +++ b/src/libcollectdclient/network_buffer.c @@ -54,7 +54,9 @@ /* Re enable deprecation warnings */ # pragma GCC diagnostic warning "-Wdeprecated-declarations" # endif +# if GCRYPT_VERSION_NUMBER < 0x010600 GCRY_THREAD_OPTION_PTHREAD_IMPL; +# endif #endif #include "collectd/network_buffer.h" @@ -131,7 +133,9 @@ static _Bool have_gcrypt (void) /* {{{ */ need_init = 0; #if HAVE_LIBGCRYPT +# if GCRYPT_VERSION_NUMBER < 0x010600 gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); +# endif if (!gcry_check_version (GCRYPT_VERSION)) return (0); @@ -146,6 +150,7 @@ static _Bool have_gcrypt (void) /* {{{ */ #endif } /* }}} _Bool have_gcrypt */ +#ifndef HAVE_HTONLL static uint64_t htonll (uint64_t val) /* {{{ */ { static int config = 0; @@ -175,6 +180,7 @@ static uint64_t htonll (uint64_t val) /* {{{ */ return ((((uint64_t) lo) << 32) | ((uint64_t) hi)); } /* }}} uint64_t htonll */ +#endif static double htond (double val) /* {{{ */ {