From fafd21c92020167fcbbb15fef8427c9f667fe42c Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Fri, 28 Feb 2020 18:20:53 +0000 Subject: www/firefox: unbreak native Wayland if XDG_RUNTIME_DIR on ZFS XDG_RUNTIME_DIR should be on tmpfs(5) for optimal performance but if users want on permanent storage like ZFS don't abort. PR: 240884 Reported by: jsm --- mail/thunderbird/files/patch-bug1618914 | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 mail/thunderbird/files/patch-bug1618914 (limited to 'mail/thunderbird/files/patch-bug1618914') diff --git a/mail/thunderbird/files/patch-bug1618914 b/mail/thunderbird/files/patch-bug1618914 new file mode 100644 index 000000000000..28d722fa6255 --- /dev/null +++ b/mail/thunderbird/files/patch-bug1618914 @@ -0,0 +1,34 @@ +[Wayland] Fall back to ftruncate if posix_fallocate isn't supported by filesystem. + +diff --git widget/gtk/WindowSurfaceWayland.cpp widget/gtk/WindowSurfaceWayland.cpp +index 9a73326399bd5..9e42a7f1c5d18 100644 +--- widget/gtk/WindowSurfaceWayland.cpp ++++ widget/gtk/WindowSurfaceWayland.cpp +@@ -235,23 +235,24 @@ + #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) { + close(fd); + MOZ_CRASH_UNSAFE_PRINTF( + "posix_fallocate() fails on %s size %d error code %d\n", filename, + aSize, ret); + } +-#else ++#endif + do { + ret = ftruncate(fd, aSize); + } while (ret < 0 && errno == EINTR); + if (ret < 0) { + close(fd); + MOZ_CRASH_UNSAFE_PRINTF("ftruncate() fails on %s size %d error code %d\n", + filename, aSize, ret); + } +-#endif + + return fd; + } -- cgit v1.2.3