From 2342aecbe60596b538004124f2b20d0aa5ef9561 Mon Sep 17 00:00:00 2001 From: Emmanuel Bouthenot Date: Fri, 29 Jan 2010 00:21:02 +0100 Subject: [PATCH] Fix a build failure with: 1.7.6 < gnutls <= 2.4.6 --- src/plugins/irc/irc-server.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 694cf15a1..e8616814e 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -2316,7 +2316,11 @@ irc_server_gnutls_callback (void *data, gnutls_session_t tls_session, } #if LIBGNUTLS_VERSION_NUMBER >= 0x010706 /* displaying infos about certificate */ +#if LIBGNUTLS_VERSION_NUMBER < 0x020400 + rinfo = gnutls_x509_crt_print (cert_temp, GNUTLS_X509_CRT_ONELINE, &cinfo); +#else rinfo = gnutls_x509_crt_print (cert_temp, GNUTLS_CRT_PRINT_ONELINE, &cinfo); +#endif if (rinfo == 0) { weechat_printf (server->buffer, @@ -2393,7 +2397,11 @@ irc_server_gnutls_callback (void *data, gnutls_session_t tls_session, tls_struct.key.x509 = tls_cert_key; #if LIBGNUTLS_VERSION_NUMBER >= 0x010706 /* client certificate info */ - rinfo = gnutls_x509_crt_print (tls_cert, GNUTLS_CRT_PRINT_ONELINE, &cinfo); +#if LIBGNUTLS_VERSION_NUMBER < 0x020400 + rinfo = gnutls_x509_crt_print (cert_temp, GNUTLS_X509_CRT_ONELINE, &cinfo); +#else + rinfo = gnutls_x509_crt_print (cert_temp, GNUTLS_CRT_PRINT_ONELINE, &cinfo); +#endif if (rinfo == 0) { weechat_printf (server->buffer,