diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-10-12 17:23:08 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-10-12 17:24:04 +0200 |
commit | e87a6eb9c0949f6807097db1240d15697b87ac81 (patch) | |
tree | 3ec83ece6a17af6c7130bea8b9fa96fc992769f9 | |
parent | f5892f0718293734e5f22747c29e17d57c08810a (diff) | |
download | gnutls-e87a6eb9c0949f6807097db1240d15697b87ac81.tar.gz |
gcrypt: don't use gcry_thread_cbs in 1.6.x and later
-rw-r--r-- | lib/gcrypt/init.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gcrypt/init.c b/lib/gcrypt/init.c index be867d38e5..5dc32ef7df 100644 --- a/lib/gcrypt/init.c +++ b/lib/gcrypt/init.c @@ -32,6 +32,7 @@ /* Functions that refer to the initialization of the libgcrypt library. */ +#if GCRYPT_VERSION_NUMBER < 0x010600 static struct gcry_thread_cbs gct = { .option = (GCRY_THREAD_OPTION_PTHREAD | (GCRY_THREAD_OPTION_VERSION << 8)), .init = NULL, @@ -42,6 +43,7 @@ static struct gcry_thread_cbs gct = { .sendmsg = NULL, .recvmsg = NULL, }; +#endif int gnutls_crypto_init (void) @@ -51,6 +53,7 @@ gnutls_crypto_init (void) { const char *p; +#if GCRYPT_VERSION_NUMBER < 0x010600 if (gnutls_mutex_init != NULL) { gct.mutex_init = gnutls_mutex_init; @@ -60,6 +63,7 @@ gnutls_crypto_init (void) gcry_control (GCRYCTL_SET_THREAD_CBS, &gct); } +#endif p = gcry_check_version (GNUTLS_MIN_LIBGCRYPT_VERSION); |