Fri Nov 17 20:48:01 2023 UTC ()
dovecot2: fix clang 15 build.


(schmonz)
diff -r1.122 -r1.123 pkgsrc/mail/dovecot2/distinfo
diff -r0 -r1.1 pkgsrc/mail/dovecot2/patches/patch-src_lib-index_test-mail-index-transaction-update.c

cvs diff -r1.122 -r1.123 pkgsrc/mail/dovecot2/distinfo (expand / switch to unified diff)

--- pkgsrc/mail/dovecot2/distinfo 2023/09/24 18:03:09 1.122
+++ pkgsrc/mail/dovecot2/distinfo 2023/11/17 20:48:01 1.123
@@ -1,16 +1,17 @@ @@ -1,16 +1,17 @@
1$NetBSD: distinfo,v 1.122 2023/09/24 18:03:09 schmonz Exp $ 1$NetBSD: distinfo,v 1.123 2023/11/17 20:48:01 schmonz Exp $
2 2
3BLAKE2s (dovecot-2.3.21.tar.gz) = 8279638bc72f97d9787b454e814dbe008b8d40aeed07019dca58ed5e7e2772fb 3BLAKE2s (dovecot-2.3.21.tar.gz) = 8279638bc72f97d9787b454e814dbe008b8d40aeed07019dca58ed5e7e2772fb
4SHA512 (dovecot-2.3.21.tar.gz) = 2d463c38639c3fd3d617ee5b1a4e4d0c11362339c4d4d62a5a90164a8b10bc58919545679bbf379139bdb743fdb013033abfddc1fc6401eb8099463cdc2401ca 4SHA512 (dovecot-2.3.21.tar.gz) = 2d463c38639c3fd3d617ee5b1a4e4d0c11362339c4d4d62a5a90164a8b10bc58919545679bbf379139bdb743fdb013033abfddc1fc6401eb8099463cdc2401ca
5Size (dovecot-2.3.21.tar.gz) = 7837242 bytes 5Size (dovecot-2.3.21.tar.gz) = 7837242 bytes
6SHA1 (patch-aa) = 3af01aa4a8cea1a3fb840b6243a744de77069611 6SHA1 (patch-aa) = 3af01aa4a8cea1a3fb840b6243a744de77069611
7SHA1 (patch-ab) = 685ab3d0e21515bf157e9897ebdebf484f0ece96 7SHA1 (patch-ab) = 685ab3d0e21515bf157e9897ebdebf484f0ece96
8SHA1 (patch-ae) = c1e76d75fab4b13d3b9b33af800bac18c90989da 8SHA1 (patch-ae) = c1e76d75fab4b13d3b9b33af800bac18c90989da
9SHA1 (patch-af) = 15aa10e75845ef258cd6934b8209a7744eb5aa4c 9SHA1 (patch-af) = 15aa10e75845ef258cd6934b8209a7744eb5aa4c
10SHA1 (patch-src_imap_imap-client.h) = 1a2bf95ab6af57d88862a1512624bf263f4c2ce7 10SHA1 (patch-src_imap_imap-client.h) = 1a2bf95ab6af57d88862a1512624bf263f4c2ce7
 11SHA1 (patch-src_lib-index_test-mail-index-transaction-update.c) = 3776417dc07cd9b00d3d1c766af33635bef5e015
11SHA1 (patch-src_lib-ldap_ldap-private.h) = 2d5ce32330ad4164cc75f8d209ba499d37ed01fc 12SHA1 (patch-src_lib-ldap_ldap-private.h) = 2d5ce32330ad4164cc75f8d209ba499d37ed01fc
12SHA1 (patch-src_lib-storage_index_dbox-common_dbox-storage.c) = 9c3aaef274726f1b9706dd29870c1d00c2fd0824 13SHA1 (patch-src_lib-storage_index_dbox-common_dbox-storage.c) = 9c3aaef274726f1b9706dd29870c1d00c2fd0824
13SHA1 (patch-src_lib_compat.h) = 4e8ab6a8fd9e7aaee8c834832eec995cbfd64317 14SHA1 (patch-src_lib_compat.h) = 4e8ab6a8fd9e7aaee8c834832eec995cbfd64317
14SHA1 (patch-src_lib_connection.h) = c147511f4ff50e4b5a048c3a363f0af90ee4c6ad 15SHA1 (patch-src_lib_connection.h) = c147511f4ff50e4b5a048c3a363f0af90ee4c6ad
15SHA1 (patch-src_lib_test-file-cache.c) = 7eb5cf9d3a44be141ab1597b270f20bf36547b6c 16SHA1 (patch-src_lib_test-file-cache.c) = 7eb5cf9d3a44be141ab1597b270f20bf36547b6c
16SHA1 (patch-src_old-stats_mail-stats.h) = 0d40c618445c089af2646a6864c3e909812282af 17SHA1 (patch-src_old-stats_mail-stats.h) = 0d40c618445c089af2646a6864c3e909812282af

File Added: pkgsrc/mail/dovecot2/patches/patch-src_lib-index_test-mail-index-transaction-update.c
$NetBSD: patch-src_lib-index_test-mail-index-transaction-update.c,v 1.1 2023/11/17 20:48:01 schmonz Exp $

Fix clang 15 build with patch from FreeBSD Ports.

--- src/lib-index/test-mail-index-transaction-update.c.orig	2023-09-14 13:17:46.000000000 +0000
+++ src/lib-index/test-mail-index-transaction-update.c
@@ -6,6 +6,7 @@
 #include "test-common.h"
 #include "mail-index-private.h"
 #include "mail-index-transaction-private.h"
+#include "utc-offset.h"
 
 #include <time.h>
 
@@ -630,7 +631,9 @@ static void test_mail_index_update_day_first_uid(void)
 
 	/* daylight savings times were confusing these tests, so we'll now
 	   just assume that TZ=UTC */
-	test_assert(timezone == 0);
+	time_t now = time(NULL);
+	struct tm *local_time = localtime(&now);
+	test_assert(utc_offset(local_time, now) == 0);
 
 	hdr.messages_count = 10;
 	t = mail_index_transaction_new();
@@ -645,13 +648,13 @@ static void test_mail_index_update_day_first_uid(void)
 		i_zero(&hdr);
 		for (j = 0; j < N_ELEMENTS(hdr.day_first_uid); j++)
 			hdr.day_first_uid[j] = 8-j;
-		hdr.day_stamp = tests[i].old_day_stamp + timezone;
+		hdr.day_stamp = tests[i].old_day_stamp;
 		memcpy(t->post_hdr_change, &hdr, sizeof(hdr));
-		mail_index_update_day_headers(t, tests[i].now + timezone);
+		mail_index_update_day_headers(t, tests[i].now);
 
 		struct mail_index_header new_hdr;
 		memcpy(&new_hdr, t->post_hdr_change, sizeof(new_hdr));
-		test_assert_idx(new_hdr.day_stamp == tests[i].new_day_stamp + timezone, i);
+		test_assert_idx(new_hdr.day_stamp == tests[i].new_day_stamp, i);
 		test_assert_idx(memcmp(new_hdr.day_first_uid,
 				       tests[i].new_day_first_uid,
 				       sizeof(uint32_t) * 8) == 0, i);