aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-05-19 07:32:10 +0200
committerMax Kellermann <max@duempel.org>2010-05-19 11:37:22 +0200
commit22f3ffb0997be4953888d0e5c61fc66256aeef5b (patch)
tree4fc60a321929cc6a99a36d422d2eddc22a175693
parent81bd8ef73cac8fa399011cb65d6f32df6e24b4b2 (diff)
downloadmpd-22f3ffb0997be4953888d0e5c61fc66256aeef5b.tar.gz
mpd-22f3ffb0997be4953888d0e5c61fc66256aeef5b.tar.xz
mpd-22f3ffb0997be4953888d0e5c61fc66256aeef5b.zip
event_pipe: call g_io_channel_win32_new_fd()
On WIN32, use g_io_channel_win32_new_fd() instead of g_io_channel_unix_new(). There doesn't seem to be a practical difference, but it seems more correct.
-rw-r--r--src/event_pipe.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/event_pipe.c b/src/event_pipe.c
index f66dc86d6..5f69ee95c 100644
--- a/src/event_pipe.c
+++ b/src/event_pipe.c
@@ -89,7 +89,12 @@ void event_pipe_init(void)
if (ret < 0)
g_error("Couldn't open pipe: %s", strerror(errno));
+#ifndef G_OS_WIN32
channel = g_io_channel_unix_new(event_pipe[0]);
+#else
+ channel = g_io_channel_win32_new_fd(event_pipe[0]);
+#endif
+
event_pipe_source_id = g_io_add_watch(channel, G_IO_IN,
main_notify_event, NULL);
g_io_channel_unref(channel);