[gtk+] Broadway: Make unix socket support conditional
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Broadway: Make unix socket support conditional
- Date: Fri, 15 Aug 2014 00:31:34 +0000 (UTC)
commit bd84bae5d93639d1135866f268f0b514610f7cf5
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Aug 14 20:29:54 2014 -0400
Broadway: Make unix socket support conditional
We need to use gio/gunixsocketaddress.h and do so
only if HAVE_GIO_UNIX is defined.
gdk/broadway/broadway-server.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gdk/broadway/broadway-server.c b/gdk/broadway/broadway-server.c
index 86c6920..2964a77 100644
--- a/gdk/broadway/broadway-server.c
+++ b/gdk/broadway/broadway-server.c
@@ -27,6 +27,9 @@
#include <netinet/in.h>
#include <netinet/tcp.h>
#endif
+#ifdef HAVE_GIO_UNIX
+#include <gio/gunixsocketaddress.h>
+#endif
#ifdef G_OS_WIN32
#include <windows.h>
#include <string.h>
@@ -1274,7 +1277,7 @@ BroadwayServer *
broadway_server_on_unix_socket_new (char *address, GError **error)
{
BroadwayServer *server;
- GSocketAddress *socket_address;
+ GSocketAddress *socket_address = NULL;
server = g_object_new (BROADWAY_TYPE_SERVER, NULL);
server->port = -1;
@@ -1288,7 +1291,9 @@ broadway_server_on_unix_socket_new (char *address, GError **error)
}
else
{
+#ifdef HAVE_GIO_UNIX
socket_address = g_unix_socket_address_new (address);
+#endif
if (socket_address == NULL)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_DATA, "Invalid unix domain socket address %s: ",
address);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]