summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-05-17 12:59:41 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-05-17 12:59:41 +0200
commitb43958ac926a9c2dd3c8511d05a0e0a40b87a71e (patch)
tree568f525c68388a74251f7d1fbd0c501d9fc04b1c /src
parenta071ee5012e9dfeb60d0c7e5081399ef194d949c (diff)
downloadweechat-b43958ac926a9c2dd3c8511d05a0e0a40b87a71e.zip
irc: use constant GNUTLS_TLS1_3 only with GnuTLS >= 3.6.3
This constant was introduced in GnuTLS 3.6.3. This fixes a build error on these old distributions: - Debian Stretch - Debian Jessie - Ubuntu Bionic - Ubuntu Xenial
Diffstat (limited to 'src')
-rw-r--r--src/plugins/irc/irc-bar-item.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-bar-item.c b/src/plugins/irc/irc-bar-item.c
index 9cf161e88..9e7d942c3 100644
--- a/src/plugins/irc/irc-bar-item.c
+++ b/src/plugins/irc/irc-bar-item.c
@@ -554,9 +554,11 @@ irc_bar_item_tls_version (const void *pointer, void *data,
version = gnutls_protocol_get_version (server->gnutls_sess);
switch (version)
{
+#if LIBGNUTLS_VERSION_NUMBER >= 0x030603 /* 3.6.3 */
case GNUTLS_TLS1_3:
color = IRC_COLOR_ITEM_TLS_VERSION_OK;
break;
+#endif
case GNUTLS_TLS1_2:
color = IRC_COLOR_ITEM_TLS_VERSION_DEPRECATED;
break;