summaryrefslogtreecommitdiff
path: root/www/cliqz/files/patch-bug1618914
diff options
context:
space:
mode:
authorAntoine Brodin <antoine@FreeBSD.org>2021-01-01 10:11:34 +0000
committerAntoine Brodin <antoine@FreeBSD.org>2021-01-01 10:11:34 +0000
commit26b4c8f71f91d22e081b27814782686edde0c90a (patch)
tree1c321c39372c25d8634e75b5c8e08edc676b296d /www/cliqz/files/patch-bug1618914
parentNew port: math/py-optuna: A hyperparameter optimization framework (diff)
Revert r559792 to unbreak INDEX and bulk -a
It seems a lot of reverse dependencies were missed With hat: portmgr
Notes
Notes: svn path=/head/; revision=559822
Diffstat (limited to 'www/cliqz/files/patch-bug1618914')
-rw-r--r--www/cliqz/files/patch-bug161891443
1 files changed, 43 insertions, 0 deletions
diff --git a/www/cliqz/files/patch-bug1618914 b/www/cliqz/files/patch-bug1618914
new file mode 100644
index 000000000000..42f909514118
--- /dev/null
+++ b/www/cliqz/files/patch-bug1618914
@@ -0,0 +1,43 @@
+[Wayland] Fall back to ftruncate if posix_fallocate isn't supported by filesystem.
+
+Taken from www/firefox
+
+diff --git widget/gtk/WindowSurfaceWayland.cpp widget/gtk/WindowSurfaceWayland.cpp
+index 9a73326399bd5..9e42a7f1c5d18 100644
+--- mozilla-release/widget/gtk/WindowSurfaceWayland.cpp
++++ mozilla-release/widget/gtk/WindowSurfaceWayland.cpp
+@@ -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 != ENODEV && ret != EINVAL && ret != EOPNOTSUPP) {
+ close(fd);
+ MOZ_CRASH("posix_fallocate() fails to allocate shm memory");
+ }
+-#else
++#endif
+ do {
+ ret = ftruncate(fd, aSize);
+ } while (ret < 0 && errno == EINTR);
+ if (ret < 0) {
+ close(fd);
+ MOZ_CRASH("ftruncate() fails to allocate shm memory");
+ }
+-#endif
+
+ return fd;
+ }
+@@ -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 != ENODEV && errno != EINVAL && errno != EOPNOTSUPP) return false;
+ #endif
+
+ wl_shm_pool_resize(mShmPool, aSize);