Merge branch 'patch-1' into 'gtk-3-24'

wayland: Use shm_open(SHM_ANON) on FreeBSD

See merge request GNOME/gtk!203
This commit is contained in:
Matthias Clasen 2018-06-19 15:43:40 +00:00
commit 70d035ae95

View File

@ -1276,6 +1276,9 @@ open_shared_memory (void)
if (force_shm_open)
{
#if defined (__FreeBSD__)
ret = shm_open (SHM_ANON, O_CREAT | O_EXCL | O_RDWR | O_CLOEXEC, 0600);
#else
char name[NAME_MAX - 1] = "";
sprintf (name, "/gdk-wayland-%x", g_random_int ());
@ -1286,6 +1289,7 @@ open_shared_memory (void)
shm_unlink (name);
else if (errno == EEXIST)
continue;
#endif
}
}
while (ret < 0 && errno == EINTR);