From 14e00ebddd362c7a5d1acdf36116426778085ffb Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Tue, 7 Jul 2009 18:08:44 -0300 Subject: [PATCH] Although less safe, this GNUTLS call is present in older versions. Use set_global_errno instead of set_errno, since the former is present in older versions and we need to make it work for older systems. However, this should only be used if a not recent enough version of GNUTLS is found. We should work with autoconf to make that work for us. --- hcconn_ssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hcconn_ssl.c b/hcconn_ssl.c index a769327..57fa9ab 100644 --- a/hcconn_ssl.c +++ b/hcconn_ssl.c @@ -140,7 +140,7 @@ ssl_pull (gnutls_transport_ptr_t ptr, void *buffer, size_t len) } if (r == 0) { - gnutls_transport_set_errno (ssl->session, EAGAIN); + gnutls_transport_set_global_errno (EAGAIN); return -1; } return r; -- 2.20.1