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:
@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user