File dovecot24-32bit-1.patch of Package dovecot24

From 6535a1c5e1c992ed5e6171633e2bfbdd684fb411 Mon Sep 17 00:00:00 2001
From: Aki Tuomi <aki.tuomi@open-xchange.com>
Date: Wed, 29 Oct 2025 13:00:24 +0200
Subject: [PATCH] lib: Fix signedness in assert in time_to_uint32()

If time_t is signed and 32-bit, this can cause warnings.
---
 src/lib/lib.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/lib.h b/src/lib/lib.h
index 46b6776d79b..d933dc07adc 100644
--- a/src/lib/lib.h
+++ b/src/lib/lib.h
@@ -142,7 +142,9 @@ static inline uint32_t i_rand_minmax(uint32_t min_val, uint32_t max_val)
 static inline uint32_t time_to_uint32(time_t ts)
 {
 	i_assert(ts >= 0);
+#if TIME_T_MAX_BITS > 32
 	i_assert(ts <= UINT32_MAX);
+#endif
 	return (uint32_t)(ts & 0xffffffff);
 }
 /* Cast time_t to uint32_t, truncate the value if it does not fit. */
-- 
GitLab

openSUSE Build Service is sponsored by