[gtk+/gtk-3-14] broadway: Only use abstract sockets when they are supported
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] broadway: Only use abstract sockets when they are supported
- Date: Sat, 31 Jan 2015 19:26:41 +0000 (UTC)
commit 959d1eff538ea0a903e9fc114f9235476e720018
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jan 18 15:24:30 2015 -0500
broadway: Only use abstract sockets when they are supported
GIO has a function to check whether abstract sockets are
supported, so use it. This should make broadway work on
Freebsd again.
https://bugzilla.gnome.org/show_bug.cgi?id=742980
gdk/broadway/broadwayd.c | 7 ++++---
gdk/broadway/gdkbroadway-server.c | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/gdk/broadway/broadwayd.c b/gdk/broadway/broadwayd.c
index 031e866..2cd69fb 100644
--- a/gdk/broadway/broadwayd.c
+++ b/gdk/broadway/broadwayd.c
@@ -452,10 +452,11 @@ main (int argc, char *argv[])
if (display == NULL)
{
#ifdef G_OS_UNIX
- display = ":0";
-#else
- display = ":tcp";
+ if (g_unix_socket_address_abstract_names_supported ())
+ display = ":0";
+ else
#endif
+ display = ":tcp";
}
if (g_str_has_prefix (display, ":tcp"))
diff --git a/gdk/broadway/gdkbroadway-server.c b/gdk/broadway/gdkbroadway-server.c
index ecb0ea4..ecd24ae 100644
--- a/gdk/broadway/gdkbroadway-server.c
+++ b/gdk/broadway/gdkbroadway-server.c
@@ -110,10 +110,11 @@ _gdk_broadway_server_new (const char *display, GError **error)
if (display == NULL)
{
#ifdef G_OS_UNIX
- display = ":0";
-#else
- display = ":tcp";
+ if (g_unix_socket_address_abstract_names_supported ())
+ display = ":0";
+ else
#endif
+ display = ":tcp";
}
if (g_str_has_prefix (display, ":tcp"))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]