aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/output/httpd_client.c7
-rw-r--r--src/output/httpd_output_plugin.c4
-rw-r--r--src/output/solaris_output_plugin.c20
3 files changed, 23 insertions, 8 deletions
diff --git a/src/output/httpd_client.c b/src/output/httpd_client.c
index e2c49c6c8..7a50f6fe6 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);
diff --git a/src/output/httpd_output_plugin.c b/src/output/httpd_output_plugin.c
index ab663badf..8ef0c11a6 100644
--- a/src/output/httpd_output_plugin.c
+++ b/src/output/httpd_output_plugin.c
@@ -214,7 +214,7 @@ httpd_listen_in_event(int fd, const struct sockaddr *address,
g_warning("libwrap refused connection (libwrap=%s) from %s",
progname, hostaddr);
g_free(hostaddr);
- close(fd);
+ close_socket(fd);
g_mutex_unlock(httpd->mutex);
return;
}
@@ -235,7 +235,7 @@ httpd_listen_in_event(int fd, const struct sockaddr *address,
httpd->clients_cnt < httpd->clients_max))
httpd_client_add(httpd, fd);
else
- close(fd);
+ close_socket(fd);
} else if (fd < 0 && errno != EINTR) {
g_warning("accept() failed: %s", g_strerror(errno));
}
diff --git a/src/output/solaris_output_plugin.c b/src/output/solaris_output_plugin.c
index 796c7806d..ce726009a 100644
--- a/src/output/solaris_output_plugin.c
+++ b/src/output/solaris_output_plugin.c
@@ -24,7 +24,6 @@
#include <glib.h>
-#include <sys/audio.h>
#include <sys/stropts.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -32,6 +31,25 @@
#include <fcntl.h>
#include <errno.h>
+#ifdef __sun
+#include <sys/audio.h>
+#else
+
+/* some fake declarations that allow build this plugin on systems
+ other than Solaris, just to see if it compiles */
+
+#define AUDIO_GETINFO 0
+#define AUDIO_SETINFO 0
+#define AUDIO_ENCODING_LINEAR 0
+
+struct audio_info {
+ struct {
+ unsigned sample_rate, channels, precision, encoding;
+ } play;
+};
+
+#endif
+
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "solaris_output"