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:
parent
274b919966
commit
3c9992aead
10
src/client.c
10
src/client.c
@ -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"
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user