aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-25 19:40:10 +0100
committerMax Kellermann <max@duempel.org>2009-01-25 19:40:10 +0100
commitb0ea975642c55fe163857ea61b4ca5a0e4416a02 (patch)
tree830be29bf52e79b18de75b63d2aa1e5a863f1d0a
parent808a369ca82e919d53fe5c0534bafc1c06785a27 (diff)
downloadmpd-b0ea975642c55fe163857ea61b4ca5a0e4416a02.tar.gz
mpd-b0ea975642c55fe163857ea61b4ca5a0e4416a02.tar.xz
mpd-b0ea975642c55fe163857ea61b4ca5a0e4416a02.zip
client: use GLib's win32 IO channel on WIN32
Use g_io_channel_win32_new_socket() instead of g_io_channel_unix_new() on WIN32.
Diffstat (limited to '')
-rw-r--r--src/client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client.c b/src/client.c
index 1b08333bb..18fc131d2 100644
--- a/src/client.c
+++ b/src/client.c
@@ -184,7 +184,12 @@ static void client_init(struct client *client, int fd)
client->bufferPos = 0;
client->fd = fd;
+#ifndef G_OS_WIN32
client->channel = g_io_channel_unix_new(client->fd);
+#else
+ client->channel = g_io_channel_win32_new_socket(client->fd);
+#endif
+
client->source_id = g_io_add_watch(client->channel, G_IO_IN,
client_in_event, client);