lib-index: Fix storing cache fields' last_used with 32bit big endian CPUs
Debian started in 2025 to build packages on 32-bit platforms with 64-bit time_t support by default. With that change, dovecot suddenly fails to build on 32-bit big endian architectures (e.g. hppa, powerpc) with those testsuite errors:
test-mail-cache-fields.c:52: Assert failed: cache_field.last_used == priv->field.last_used && cache_field.decision == priv->field.decision test-mail-cache-fields.c:67: Assert failed: cache_field.last_used == priv->field.last_used && cache_field.decision == priv->field.decision test-mail-cache-fields.c:96: Assert failed: cache_field.last_used == priv->field.last_used && cache_field.decision == priv->field.decision mail cache fields read-write ......................................... : FAILED
Change the existing code for big endian architectures to actually check the size of time_t at compile time instead of hardcoding a check for SIZEOF_VOID_P to fix the issue for 32- and 64-bit big endian architectures.
Cc: Timo Sirainen [email protected] Fixes: 1ee84ba0659f ("lib-index: Fix storing cache fields' last_used with 64bit big endian CPUs")