summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2020-06-11 21:52:28 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2020-06-11 21:52:28 +0100
commite447a470aae2e45fc80bfb14a77b06e6f57f4d5c (patch)
tree298923657659a44cb09bfc0bb3157be1046787b6
parentf6fa370ab8cc56cf06e906a1a2c714d196aac81b (diff)
GnuTLS: fix build on older library versions
-rw-r--r--src/src/tls-gnu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/src/tls-gnu.c b/src/src/tls-gnu.c
index eff9e8859..df520e8d7 100644
--- a/src/src/tls-gnu.c
+++ b/src/src/tls-gnu.c
@@ -427,10 +427,12 @@ uschar * errstr;
msg = rc == GNUTLS_E_FATAL_ALERT_RECEIVED
? string_sprintf("A TLS fatal alert has been received: %s",
US gnutls_alert_get_name(gnutls_alert_get(state->session)))
+#ifdef GNUTLS_E_PREMATURE_TERMINATION
: rc == GNUTLS_E_PREMATURE_TERMINATION && errno
? errno == ECONNRESET /* Outlook does this to us right after sending us QUIT */
? string_sprintf("syscall: %s", strerror(errno))
: string_sprintf("%s: syscall: %s", US gnutls_strerror(rc), strerror(errno))
+#endif
: US gnutls_strerror(rc);
(void) tls_error(when, msg, state->host, &errstr);