diff options
author | Pierre Ossman <ossman@cendio.se> | 2012-07-03 14:52:26 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2012-07-03 14:52:26 +0000 |
commit | 2137f4f78f2b80faf96707907cd08562d83f1216 (patch) | |
tree | 6b9c8f1e09c1dd343b65510d853ba9c3e62f1db6 /common/rdr/TLSOutStream.cxx | |
parent | fe48cd4d2427c0262cd58b30c74331a9fce756c7 (diff) | |
download | tigervnc-2137f4f78f2b80faf96707907cd08562d83f1216.tar.gz tigervnc-2137f4f78f2b80faf96707907cd08562d83f1216.zip |
GnuTLS 3.x has removed gnutls_transport_set_global_errno() in favour of
gnutls_transport_set_errno(). Make sure we call the right errno function
depending on which GnuTLS we're using.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4922 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rdr/TLSOutStream.cxx')
-rw-r--r-- | common/rdr/TLSOutStream.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/common/rdr/TLSOutStream.cxx b/common/rdr/TLSOutStream.cxx index ec21670c..ef32d7db 100644 --- a/common/rdr/TLSOutStream.cxx +++ b/common/rdr/TLSOutStream.cxx @@ -25,12 +25,9 @@ #include <rdr/Exception.h> #include <rdr/TLSException.h> #include <rdr/TLSOutStream.h> +#include <rdr/TLSErrno.h> #include <errno.h> -#ifdef HAVE_OLD_GNUTLS -#define gnutls_transport_set_global_errno(A) do { errno = (A); } while(0) -#endif - #ifdef HAVE_GNUTLS using namespace rdr; @@ -46,7 +43,7 @@ ssize_t TLSOutStream::push(gnutls_transport_ptr str, const void* data, out->writeBytes(data, size); out->flush(); } catch (Exception& e) { - gnutls_transport_set_global_errno(EINVAL); + gnutls_errno_helper(self->session, EINVAL); return -1; } |