From b03f9ece05c6f9a6410da48ec024f9d6bed0dc82 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 19 Sep 2011 20:40:33 +0200 Subject: 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. --- src/output/httpd_client.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/output/httpd_client.c') diff --git a/src/output/httpd_client.c b/src/output/httpd_client.c index 1119a783..995c1f65 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 #include @@ -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); -- cgit v1.2.3