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 /src/client.c | |
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 |
1 files changed, 8 insertions, 2 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" |