Commit 9c1063f6 authored by Matthias Clasen's avatar Matthias Clasen

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
parent 811d6028
......@@ -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"))
......
......@@ -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"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment