Make sure Win32 sockets are available in new listening API
diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx
index 5ce7bc3..26ea1f5 100644
--- a/common/network/TcpSocket.cxx
+++ b/common/network/TcpSocket.cxx
@@ -543,6 +543,9 @@
 {
   std::list<TcpListener> new_listeners;
   vnc_sockaddr_t sa;
+
+  initSockets();
+
 #ifdef HAVE_GETADDRINFO
   if (UseIPv6) {
     sa.u.sin6.sin6_family = AF_INET6;
@@ -591,6 +594,8 @@
   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;