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
This commit is contained in:
Matthias Clasen
2015-01-18 15:24:30 -05:00
parent 811d602842
commit 9c1063f602
2 changed files with 8 additions and 6 deletions

View File

@ -456,10 +456,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"))

View File

@ -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"))