summaryrefslogtreecommitdiff
path: root/user/dovecot/fix-time64.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2023-02-23 09:54:35 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2023-02-23 09:54:35 +0000
commit6ee72293e3354a0a3b4f14d0bbc44692b5c56ea9 (patch)
treee58db45a1a02336952fa3cae7e5e006e45c25014 /user/dovecot/fix-time64.patch
parent4e8bc2f46eee8ff4e7510dc91415d6dc5c69a073 (diff)
downloadpackages-6ee72293e3354a0a3b4f14d0bbc44692b5c56ea9.tar.gz
packages-6ee72293e3354a0a3b4f14d0bbc44692b5c56ea9.tar.bz2
packages-6ee72293e3354a0a3b4f14d0bbc44692b5c56ea9.tar.xz
packages-6ee72293e3354a0a3b4f14d0bbc44692b5c56ea9.zip
user/dovecot: Fix cache flush on 32-bit big endian
They already had a workaround for 64-bit BE. Since time_t is 64-bit on all musl platforms, we need it active at all times. Fixes: #966
Diffstat (limited to 'user/dovecot/fix-time64.patch')
-rw-r--r--user/dovecot/fix-time64.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/user/dovecot/fix-time64.patch b/user/dovecot/fix-time64.patch
new file mode 100644
index 000000000..30d0307d5
--- /dev/null
+++ b/user/dovecot/fix-time64.patch
@@ -0,0 +1,13 @@
+We need to case this on sizeof(time_t), not sizeof(void*).
+
+--- dovecot-2.3.20/src/lib-index/mail-cache-fields.c.old 2023-02-22 08:01:49.420556821 +0000
++++ dovecot-2.3.20/src/lib-index/mail-cache-fields.c 2023-02-23 09:45:11.417417626 +0000
+@@ -529,7 +529,7 @@
+ copy_to_buf_last_used(struct mail_cache *cache, buffer_t *dest, bool add_new)
+ {
+ size_t offset = offsetof(struct mail_cache_field, last_used);
+-#if defined(WORDS_BIGENDIAN) && SIZEOF_VOID_P == 8
++#if defined(WORDS_BIGENDIAN) && TIME_T_MAX_BITS > 32
+ /* 64bit time_t with big endian CPUs: copy the last 32 bits instead of
+ the first 32 bits (that are always 0). The 32 bits are enough until
+ year 2106, so we're not in a hurry to use 64 bits on disk. */