]> git.eshelyaron.com Git - emacs.git/commitdiff
Build fix for older gnutls versions
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 25 Jan 2017 13:21:13 +0000 (14:21 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 25 Jan 2017 13:21:22 +0000 (14:21 +0100)
* src/gnutls.c (emacs_gnutls_handle_error):
GNUTLS_E_PREMATURE_TERMINATION is apparently only present in
gnutls-3.

src/gnutls.c

index 6fa0e1097280f1870778612db2667fe5122bc6e7..65b83bad6b82a65d3fdf822b8ebf2e0f5be82408 100644 (file)
@@ -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;