diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2020-02-28 18:20:53 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2020-02-28 18:20:53 +0000 |
commit | fafd21c92020167fcbbb15fef8427c9f667fe42c (patch) | |
tree | 784626488ccb848a183cbf7b2be0dc596bab9329 /mail/thunderbird/files/patch-bug1618914 | |
parent | databases/gnats4: back to the pool (diff) |
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
Notes
Notes:
svn path=/head/; revision=527346
Diffstat (limited to 'mail/thunderbird/files/patch-bug1618914')
-rw-r--r-- | mail/thunderbird/files/patch-bug1618914 | 34 |
1 files changed, 34 insertions, 0 deletions
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; + } |