svn commit: r540400 - in head/www/firefox: . files
Jan Beich
jbeich at FreeBSD.org
Thu Jun 25 16:04:50 UTC 2020
Author: jbeich
Date: Thu Jun 25 16:04:49 2020
New Revision: 540400
URL: https://svnweb.freebsd.org/changeset/ports/540400
Log:
www/firefox: unbreak Wayland on FreeBSD < 13 after r539972
shm_open object doesn't support posix_fallocate on old kernels which
leads to a crash.
PR: 247329
Reported by: ashish
Modified:
head/www/firefox/Makefile (contents, props changed)
head/www/firefox/files/patch-bug1618914 (contents, props changed)
Modified: head/www/firefox/Makefile
==============================================================================
--- head/www/firefox/Makefile Thu Jun 25 15:54:55 2020 (r540399)
+++ head/www/firefox/Makefile Thu Jun 25 16:04:49 2020 (r540400)
@@ -3,6 +3,7 @@
PORTNAME= firefox
DISTVERSION= 78.0
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
Modified: head/www/firefox/files/patch-bug1618914
==============================================================================
--- head/www/firefox/files/patch-bug1618914 Thu Jun 25 15:54:55 2020 (r540399)
+++ head/www/firefox/files/patch-bug1618914 Thu Jun 25 16:04:49 2020 (r540400)
@@ -4,14 +4,15 @@ diff --git widget/gtk/WindowSurfaceWayland.cpp widget/
index 9a73326399bd5..9e42a7f1c5d18 100644
--- widget/gtk/WindowSurfaceWayland.cpp
+++ widget/gtk/WindowSurfaceWayland.cpp
-@@ -222,19 +222,20 @@ static int WaylandAllocateShmMemory(int aSize) {
+@@ -222,20 +222,21 @@ static int WaylandAllocateShmMemory(int aSize) {
+ #ifdef HAVE_POSIX_FALLOCATE
do {
ret = posix_fallocate(fd, 0, aSize);
} while (ret == EINTR);
- if (ret != 0) {
+ if (ret == 0) {
+ return fd;
-+ } else if (ret != EINVAL && ret != EOPNOTSUPP) {
++ } else if (ret != ENODEV && ret != EINVAL && ret != EOPNOTSUPP) {
close(fd);
MOZ_CRASH("posix_fallocate() fails to allocate shm memory");
}
@@ -28,12 +29,13 @@ index 9a73326399bd5..9e42a7f1c5d18 100644
return fd;
}
-@@ -265,7 +266,7 @@ bool WaylandShmPool::Resize(int aSize) {
+@@ -265,8 +266,8 @@ bool WaylandShmPool::Resize(int aSize) {
+ #ifdef HAVE_POSIX_FALLOCATE
do {
errno = posix_fallocate(mShmPoolFd, 0, aSize);
} while (errno == EINTR);
- if (errno != 0) return false;
-+ if (errno != 0 && errno != EINVAL && errno != EOPNOTSUPP) return false;
++ if (errno != 0 && errno != ENODEV && errno != EINVAL && errno != EOPNOTSUPP) return false;
#endif
wl_shm_pool_resize(mShmPool, aSize);
More information about the svn-ports-all
mailing list