diff options
author | Max Kellermann <max@duempel.org> | 2011-09-19 20:40:33 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-09-20 08:35:25 +0200 |
commit | b03f9ece05c6f9a6410da48ec024f9d6bed0dc82 (patch) | |
tree | 93a4e566fd407330c039b958ab819d7a3916f6cc /src/output | |
parent | 1d8840412fc1dd76a73ee13413cd7fc9a6ff229a (diff) | |
download | mpd-b03f9ece05c6f9a6410da48ec024f9d6bed0dc82.tar.gz mpd-b03f9ece05c6f9a6410da48ec024f9d6bed0dc82.tar.xz mpd-b03f9ece05c6f9a6410da48ec024f9d6bed0dc82.zip |
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/output')
-rw-r--r-- | src/output/httpd_client.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/output/httpd_client.c b/src/output/httpd_client.c index 1119a7834..995c1f659 100644 --- a/src/output/httpd_client.c +++ b/src/output/httpd_client.c @@ -24,6 +24,7 @@ #include "page.h" #include "icy_server.h" #include "glib_compat.h" +#include "glib_socket.h" #include <stdbool.h> #include <assert.h> @@ -459,11 +460,7 @@ httpd_client_new(struct httpd_output *httpd, int fd, bool metadata_supported) client->httpd = httpd; -#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); |