diff --git a/src/libvirt.c b/src/libvirt.c index 5167bc24d8..16c851ff3e 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -291,7 +291,12 @@ static int virTLSMutexUnlock(void **priv) } static struct gcry_thread_cbs virTLSThreadImpl = { + /* GCRY_THREAD_OPTION_VERSION was added in gcrypt 1.4.2 */ +#ifdef GCRY_THREAD_OPTION_VERSION (GCRY_THREAD_OPTION_PTHREAD | (GCRY_THREAD_OPTION_VERSION << 8)), +#else + GCRY_THREAD_OPTION_PTHREAD, +#endif NULL, virTLSMutexInit, virTLSMutexDestroy,