#include <glib.h>
#include <string.h>
#include <unistd.h>
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
+#endif
#include <errno.h>
/* Message logging helpers with subsystem-specific prefix string. */