aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Ingebrigtsen2017-01-25 14:21:13 +0100
committerLars Ingebrigtsen2017-01-25 14:21:22 +0100
commit6bfa9e9abca17290bc393d90aedb5abef83a3e06 (patch)
tree58bbe145e23b06554cb15f7bd751584de4e40138 /src
parentcf9ce4fcfc38ef3eda01fcc504f4d792fcabe6d5 (diff)
downloademacs-6bfa9e9abca17290bc393d90aedb5abef83a3e06.tar.gz
emacs-6bfa9e9abca17290bc393d90aedb5abef83a3e06.zip
Build fix for older gnutls versions
* src/gnutls.c (emacs_gnutls_handle_error): GNUTLS_E_PREMATURE_TERMINATION is apparently only present in gnutls-3.
Diffstat (limited to 'src')
-rw-r--r--src/gnutls.c2
1 files changed, 2 insertions, 0 deletions
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)
586 /* Mostly ignore "The TLS connection was non-properly 586 /* Mostly ignore "The TLS connection was non-properly
587 terminated" message which just means that the peer closed the 587 terminated" message which just means that the peer closed the
588 connection. */ 588 connection. */
589#ifdef HAVE_GNUTLS3
589 if (err == GNUTLS_E_PREMATURE_TERMINATION) 590 if (err == GNUTLS_E_PREMATURE_TERMINATION)
590 level = 3; 591 level = 3;
592#endif
591 593
592 GNUTLS_LOG2 (level, max_log_level, "fatal error:", str); 594 GNUTLS_LOG2 (level, max_log_level, "fatal error:", str);
593 ret = 0; 595 ret = 0;