Skip to content

tls_gnutls: Fix gnutls_transport_set_errno calls on Windows#692

Merged
bk138 merged 1 commit intoLibVNC:masterfrom
mstorsjo:gnutls-errno
Mar 10, 2026
Merged

tls_gnutls: Fix gnutls_transport_set_errno calls on Windows#692
bk138 merged 1 commit intoLibVNC:masterfrom
mstorsjo:gnutls-errno

Conversation

@mstorsjo
Copy link
Contributor

gnutls_transport_set_errno takes a plain "gnutls_session_t", not a "gnutls_session_t *".

This fixes build errors if building with a recent version of Clang targeting Windows:

libvncserver/src/libvncclient/tls_gnutls.c:161:32: error: incompatible pointer types passing 'gnutls_session_t *' (aka 'struct gnutls_session_int **') to parameter of type 'gnutls_session_t' (aka 'struct gnutls_session_int *'); dereference with * [-Wincompatible-pointer-types]
  161 |     gnutls_transport_set_errno(session, EAGAIN);
      |                                ^~~~~~~
      |                                *
x86_64-w64-mingw32/include/gnutls/gnutls.h:2429:50: note: passing argument to parameter 'session' here
 2429 | void gnutls_transport_set_errno(gnutls_session_t session, int err);
      |                                                  ^

gnutls_transport_set_errno takes a plain "gnutls_session_t", not
a "gnutls_session_t *".

This fixes build errors if building with a recent version of Clang
targeting Windows:

    libvncserver/src/libvncclient/tls_gnutls.c:161:32: error: incompatible pointer types passing 'gnutls_session_t *' (aka 'struct gnutls_session_int **') to parameter of type 'gnutls_session_t' (aka 'struct gnutls_session_int *'); dereference with * [-Wincompatible-pointer-types]
      161 |     gnutls_transport_set_errno(session, EAGAIN);
          |                                ^~~~~~~
          |                                *
    x86_64-w64-mingw32/include/gnutls/gnutls.h:2429:50: note: passing argument to parameter 'session' here
     2429 | void gnutls_transport_set_errno(gnutls_session_t session, int err);
          |                                                  ^
@bk138 bk138 merged commit 53b76ce into LibVNC:master Mar 10, 2026
28 checks passed
@bk138
Copy link
Member

bk138 commented Mar 10, 2026

Thanks!

@mstorsjo mstorsjo deleted the gnutls-errno branch March 10, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants