From: Thadeu Lima de Souza Cascardo Date: Tue, 7 Jul 2009 21:08:44 +0000 (-0300) Subject: Although less safe, this GNUTLS call is present in older versions. X-Git-Tag: v0.1.3~13 X-Git-Url: http://git.cascardo.info/?p=cascardo%2Frnetproxy.git;a=commitdiff_plain;h=14e00ebddd362c7a5d1acdf36116426778085ffb 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. --- 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;