client: include winsock headers on WIN32

On Windows, socket declarations reside in winsock.h and ws2tcpip.h.
The POSIX headers sys/socket.h etc. are not available.
This commit is contained in:
Max Kellermann 2008-12-29 17:42:43 +01:00
parent 274b919966
commit 3c9992aead
2 changed files with 9 additions and 3 deletions

View File

@ -31,11 +31,17 @@
#include <glib.h>
#include <assert.h>
#include <unistd.h>
#include <string.h>
#ifdef WIN32
#include <ws2tcpip.h>
#include <winsock.h>
#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <string.h>
#endif
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "client"

View File

@ -23,9 +23,9 @@
#include <stdbool.h>
#include <stddef.h>
#include <stdarg.h>
#include <sys/socket.h>
struct client;
struct sockaddr;
void client_manager_init(void);
void client_manager_deinit(void);