aboutsummaryrefslogtreecommitdiff
path: root/src/event_pipe.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-19 20:40:33 +0200
committerMax Kellermann <max@duempel.org>2011-09-20 08:35:25 +0200
commitb03f9ece05c6f9a6410da48ec024f9d6bed0dc82 (patch)
tree93a4e566fd407330c039b958ab819d7a3916f6cc /src/event_pipe.c
parent1d8840412fc1dd76a73ee13413cd7fc9a6ff229a (diff)
glib_socket.h: wrap g_io_channel_*_new() calls portably
The server_socket library (used by the httpd output plugin) didn't check for WIN32, that's fixed now.
Diffstat (limited to 'src/event_pipe.c')
-rw-r--r--src/event_pipe.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/event_pipe.c b/src/event_pipe.c
index 5b519984..edfd40eb 100644
--- a/src/event_pipe.c
+++ b/src/event_pipe.c
@@ -21,6 +21,7 @@
#include "event_pipe.h"
#include "fd_util.h"
#include "mpd_error.h"
+#include "glib_socket.h"
#include <stdbool.h>
#include <assert.h>
@@ -94,11 +95,7 @@ void event_pipe_init(void)
if (ret < 0)
MPD_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
+ channel = g_io_channel_new_socket(event_pipe[0]);
g_io_channel_set_encoding(channel, NULL, NULL);
g_io_channel_set_buffered(channel, false);