aboutsummaryrefslogtreecommitdiff
path: root/graphics/wayland
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2020-02-28 10:23:24 +0000
committerJan Beich <jbeich@FreeBSD.org>2020-02-28 10:23:24 +0000
commit78d456d1af5a96e80bfdd2bffd49d7f48f5f5f95 (patch)
tree996ef59f670f5fd7a9aa0e2a68e619d2d842d71f /graphics/wayland
parent105d7aecee201ed99604ff20735a5b2eb935dfc5 (diff)
downloadports-78d456d1af5a96e80bfdd2bffd49d7f48f5f5f95.tar.gz
ports-78d456d1af5a96e80bfdd2bffd49d7f48f5f5f95.zip
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
Notes
Notes: svn path=/head/; revision=527326
Diffstat (limited to 'graphics/wayland')
-rw-r--r--graphics/wayland/Makefile2
-rw-r--r--graphics/wayland/files/patch-cursor_os-compatibility.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/graphics/wayland/Makefile b/graphics/wayland/Makefile
index fb0253475b39..5747ec83dba5 100644
--- a/graphics/wayland/Makefile
+++ b/graphics/wayland/Makefile
@@ -3,7 +3,7 @@
PORTNAME= wayland
PORTVERSION= 1.18.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= graphics wayland
MASTER_SITES= https://wayland.freedesktop.org/releases/
diff --git a/graphics/wayland/files/patch-cursor_os-compatibility.c b/graphics/wayland/files/patch-cursor_os-compatibility.c
index f3e95d4411ff..7f81a2d1aae1 100644
--- a/graphics/wayland/files/patch-cursor_os-compatibility.c
+++ b/graphics/wayland/files/patch-cursor_os-compatibility.c
@@ -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