Files
ports/mail/thunderbird/files/patch-bug1618914
T
Christoph Moench-Tegeder ba9052fd39 update mail/thunderbird to 78.2.2
See https://support.mozilla.org/en-US/kb/new-thunderbird-78 for major
changes in Thunderbird 78, the release announcement in
https://blog.thunderbird.net/2020/07/whats-new-in-thunderbird-78/ and
https://blog.thunderbird.net/2020/09/openpgp-in-thunderbird-78/ info
for OpenPGP users. Also check UPDATING 20200918.
Current release notes are in
https://www.thunderbird.net/en-US/thunderbird/78.2.2/releasenotes/

PR:		249346
Submitted by:	jbeich
2020-09-18 10:02:23 +00:00

42 lines
1.2 KiB
Plaintext

[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
@@ -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);