Date: Fri, 28 Feb 2020 10:23:25 +0000 (UTC) From: Jan Beich <jbeich@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r527326 - in head/graphics/wayland: . files Message-ID: <202002281023.01SANPkH073242@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jbeich Date: Fri Feb 28 10:23:24 2020 New Revision: 527326 URL: https://svnweb.freebsd.org/changeset/ports/527326 Log: graphics/wayland: disable posix_fallocate on FreeBSD < 13 after r527045 On FreeBSD < 13 neither memfd_create exists nor posix_fallocate works with file descriptors returned by shm_open. As SHM_ANON code wasn't upstreamed and is not used on FreeBSD 13 just disable posix_fallocate without version checks. Reported by: Pete Wright, raichoo Tested by: Pete Wright, raichoo Approved by: zeising (x11), Greg V Differential Revision: https://reviews.freebsd.org/D23856 Modified: head/graphics/wayland/Makefile (contents, props changed) head/graphics/wayland/files/patch-cursor_os-compatibility.c (contents, props changed) Modified: head/graphics/wayland/Makefile ============================================================================== --- head/graphics/wayland/Makefile Fri Feb 28 09:31:50 2020 (r527325) +++ head/graphics/wayland/Makefile Fri Feb 28 10:23:24 2020 (r527326) @@ -3,7 +3,7 @@ PORTNAME= wayland PORTVERSION= 1.18.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= graphics wayland MASTER_SITES= https://wayland.freedesktop.org/releases/ Modified: head/graphics/wayland/files/patch-cursor_os-compatibility.c ============================================================================== --- head/graphics/wayland/files/patch-cursor_os-compatibility.c Fri Feb 28 09:31:50 2020 (r527325) +++ head/graphics/wayland/files/patch-cursor_os-compatibility.c Fri Feb 28 10:23:24 2020 (r527326) @@ -9,11 +9,13 @@ #include <sys/mman.h> #endif -@@ -132,6 +132,9 @@ os_create_anonymous_file(off_t size) +@@ -131,6 +131,11 @@ os_create_anonymous_file(off_t size) */ fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL); } else +#elif defined(__FreeBSD__) ++/* posix_fallocate returns ENODEV before https://svnweb.freebsd.org/changeset/base/356512 */ ++#undef HAVE_POSIX_FALLOCATE + fd = shm_open(SHM_ANON, O_CREAT | O_RDWR | O_CLOEXEC, 0600); // shm_open is always CLOEXEC + if (fd < 0) #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002281023.01SANPkH073242>