summaryrefslogtreecommitdiff
path: root/user/dovecot/fix-time64.patch
diff options
context:
space:
mode:
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. */