From 9d78440b8354ae81f3fc094569f710c27f3ad0e6 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 17 Mar 2015 17:10:10 +0100 Subject: [PATCH] Make sure Win32 sockets are available in new listening API --- common/network/TcpSocket.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx index 5ce7bc31..26ea1f5e 100644 --- a/common/network/TcpSocket.cxx +++ b/common/network/TcpSocket.cxx @@ -543,6 +543,9 @@ void network::createLocalTcpListeners(std::list *listeners, { std::list new_listeners; vnc_sockaddr_t sa; + + initSockets(); + #ifdef HAVE_GETADDRINFO if (UseIPv6) { sa.u.sin6.sin6_family = AF_INET6; @@ -591,6 +594,8 @@ void network::createTcpListeners(std::list *listeners, struct addrinfo *ai, *current, hints; char service[16]; + initSockets(); + memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_flags = AI_PASSIVE | AI_NUMERICSERV; hints.ai_family = AF_UNSPEC; -- 2.39.5