listen: include winsock headers on WIN32

On Windows, socket declarations reside in winsock.h and ws2tcpip.h.
The POSIX headers are not available.
This commit is contained in:
Max Kellermann 2008-12-30 19:07:10 +01:00
parent e888af98a2
commit 2eaeb65666

View File

@ -26,9 +26,15 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#ifdef WIN32
#include <ws2tcpip.h>
#include <winsock.h>
#else
#include <netinet/in.h>
#include <sys/un.h>
#include <netdb.h>
#endif
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "listen"