From: Lars Ingebrigtsen Date: Wed, 25 Jan 2017 13:21:13 +0000 (+0100) Subject: Build fix for older gnutls versions X-Git-Tag: emacs-26.0.90~870^2~67 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6bfa9e9abca17290bc393d90aedb5abef83a3e06;p=emacs.git Build fix for older gnutls versions * src/gnutls.c (emacs_gnutls_handle_error): GNUTLS_E_PREMATURE_TERMINATION is apparently only present in gnutls-3. --- diff --git a/src/gnutls.c b/src/gnutls.c index 6fa0e109728..65b83bad6b8 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -586,8 +586,10 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err) /* Mostly ignore "The TLS connection was non-properly terminated" message which just means that the peer closed the connection. */ +#ifdef HAVE_GNUTLS3 if (err == GNUTLS_E_PREMATURE_TERMINATION) level = 3; +#endif GNUTLS_LOG2 (level, max_log_level, "fatal error:", str); ret = 0;