提交 1c5c6333 编写于 作者: M Matthias Bolte

Fix compilation with gcrypt < 1.4.2

Commit 33a198c1 increased the gcrypt
version requirement to 1.4.2 because the GCRY_THREAD_OPTION_VERSION
define was added in this version.

The configure script doesn't check for the gcrypt version. To support
gcrypt versions < 1.4.2 change the virTLSThreadImpl initialization
to use GCRY_THREAD_OPTION_VERSION only if it's defined.
上级 1a43d0b2
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册