diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index 4db3f21..23c4d77 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -271,7 +271,11 @@ rfbNewTCPOrUDPClient(rfbScreenInfoPtr rfbScreen, rfbProtocolVersionMsg pv; rfbClientIteratorPtr iterator; rfbClientPtr cl,cl_; +#ifdef LIBVNCSERVER_IPv6 struct sockaddr_storage addr; +#else + struct sockaddr_in addr; +#endif socklen_t addrlen = sizeof(addr); rfbProtocolExtension* extension; diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c index 132a721..3b5ef60 100644 --- a/libvncserver/sockets.c +++ b/libvncserver/sockets.c @@ -380,7 +380,11 @@ rfbProcessNewConnection(rfbScreenInfoPtr rfbScreen) { const int one = 1; int sock = -1; +#ifdef LIBVNCSERVER_IPv6 struct sockaddr_storage addr; +#else + struct sockaddr_in addr; +#endif socklen_t addrlen = sizeof(addr); fd_set listen_fds; int chosen_listen_sock = -1;