From 22f3ffb0997be4953888d0e5c61fc66256aeef5b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 19 May 2010 07:32:10 +0200 Subject: [PATCH] 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. --- src/event_pipe.c | 5 +++++ 1 file changed, 5 insertions(+) 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);