Fixed bug #2530: yaz listener broken on Vista.
[yaz-moved-to-github.git] / src / tcpip.c
index b1ee8e4..ba3853a 100644 (file)
@@ -829,7 +829,11 @@ int tcpip_listen(COMSTACK h, char *raddr, int *addrlen,
         h->cerrno = CSOUTSTATE;
         return -1;
     }
+#ifdef WIN32
+    h->newfd = accept(h->iofile, 0, 0);
+#else
     h->newfd = accept(h->iofile, (struct sockaddr*)&addr, &len);
+#endif
     if (h->newfd < 0)
     {
         if (