diff options
Diffstat (limited to '')
-rw-r--r-- | src/client_new.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/client_new.c b/src/client_new.c index 781a36524..0ee21916b 100644 --- a/src/client_new.c +++ b/src/client_new.c @@ -22,6 +22,7 @@ #include "fifo_buffer.h" #include "socket_util.h" #include "permission.h" +#include "glib_socket.h" #include <assert.h> #include <sys/types.h> @@ -82,11 +83,7 @@ void client_new(int fd, const struct sockaddr *sa, size_t sa_length, int uid) client = g_new0(struct client, 1); -#ifndef G_OS_WIN32 - client->channel = g_io_channel_unix_new(fd); -#else - client->channel = g_io_channel_win32_new_socket(fd); -#endif + client->channel = g_io_channel_new_socket(fd); /* GLib is responsible for closing the file descriptor */ g_io_channel_set_close_on_unref(client->channel, true); /* NULL encoding means the stream is binary safe; the MPD |