diff options
author | Max Kellermann <max@duempel.org> | 2008-12-29 17:42:43 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-12-29 17:42:43 +0100 |
commit | 3c9992aead84237af76e1514a826a56daa8465bc (patch) | |
tree | 9768cda53e8853451fb45fa83c1649c1c407c744 | |
parent | 274b919966c8db5031b1f0c92d0efcd372892e42 (diff) | |
download | mpd-3c9992aead84237af76e1514a826a56daa8465bc.tar.gz mpd-3c9992aead84237af76e1514a826a56daa8465bc.tar.xz mpd-3c9992aead84237af76e1514a826a56daa8465bc.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/client.c | 10 | ||||
-rw-r--r-- | src/client.h | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/client.c b/src/client.c index 921b08503..c5d7d75bc 100644 --- a/src/client.c +++ b/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" diff --git a/src/client.h b/src/client.h index 196afe7fa..e58b629bd 100644 --- a/src/client.h +++ b/src/client.h @@ -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); |