summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2012-02-27 15:05:59 +0100
committerChristian Beier <dontmind@freeshell.org>2012-02-27 15:05:59 +0100
commit23413bf1200ce2fb3f5325a0292cbca7a4609e26 (patch)
tree84d34c020b36538ba8f774363343425c964ad6b3
parent83a7c713a99a65f910fabab1bb95428762f569fb (diff)
downloadlibtdevnc-23413bf1200ce2fb3f5325a0292cbca7a4609e26.tar.gz
libtdevnc-23413bf1200ce2fb3f5325a0292cbca7a4609e26.zip
IPv6 support for LibVNCServer, part onepointfive: Fix compilation with IPv6 missing.
There was an oversight that crept in...
-rw-r--r--libvncserver/rfbserver.c4
-rw-r--r--libvncserver/sockets.c4
2 files changed, 8 insertions, 0 deletions
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;