--- a/libmailwatch-core/mailwatch-net-conn.c +++ b/libmailwatch-core/mailwatch-net-conn.c @@ -133,7 +133,8 @@ typedef enum #define GNUTLS_CA_FILE "ca.pem" -/* stuff to support 'gthreads' with gcrypt */ +#if GCRYPT_VERSION_NUMBER < 0x010600 +/* stuff to support 'gthreads' with gcrypt < 1.6 */ static int my_g_mutex_init(void **priv); static int my_g_mutex_destroy(void **priv); static int my_g_mutex_lock(void **priv); @@ -195,6 +196,7 @@ my_g_mutex_unlock(void **priv) g_mutex_unlock(*gmx); return 0; } +#endif /* GCRYPT_VERSION_NUMBER < 0x010600 */ #endif /* defined(HAVE_SSL_SUPPORT) */ @@ -365,7 +367,9 @@ xfce_mailwatch_net_conn_init(void) if(!__inited) { #ifdef HAVE_SSL_SUPPORT +#if GCRYPT_VERSION_NUMBER < 0x010600 gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_gthread); +#endif gnutls_global_init(); #endif __inited = TRUE;