git: c5c7a990f192 - main - mail/dovecot-coi: fix build with recent dovecot

From: Tijl Coosemans <tijl_at_FreeBSD.org>
Date: Fri, 27 May 2022 09:55:02 UTC
The branch main has been updated by tijl:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c5c7a990f192d993704ceae5a017c199acd2dead

commit c5c7a990f192d993704ceae5a017c199acd2dead
Author:     Tijl Coosemans <tijl@FreeBSD.org>
AuthorDate: 2022-05-20 15:58:51 +0000
Commit:     Tijl Coosemans <tijl@FreeBSD.org>
CommitDate: 2022-05-27 09:11:01 +0000

    mail/dovecot-coi: fix build with recent dovecot
    
    PR:             263970
---
 .../files/patch-src_lib-coi_coi-contact.c          | 35 ++++++++++++++++++++++
 .../files/patch-src_webpush_test-webpush-message.c | 10 +++++++
 2 files changed, 45 insertions(+)

diff --git a/mail/dovecot-coi/files/patch-src_lib-coi_coi-contact.c b/mail/dovecot-coi/files/patch-src_lib-coi_coi-contact.c
new file mode 100644
index 000000000000..ac29903a64fd
--- /dev/null
+++ b/mail/dovecot-coi/files/patch-src_lib-coi_coi-contact.c
@@ -0,0 +1,35 @@
+--- src/lib-coi/coi-contact.c.orig	2019-12-04 09:11:06 UTC
++++ src/lib-coi/coi-contact.c
+@@ -500,7 +500,7 @@ static int lmtp_coi_mail_bodies_equal(struct mail *mai
+ 	if (mail_get_stream(mail1, &hdr_size, NULL, &input1) < 0) {
+ 		errstr = mailbox_get_last_error(mail1->box, &error);
+ 		if (error != MAIL_ERROR_EXPUNGED)
+-			e_error(mail1->event, "Contact merge failed: "
++			e_error(mail_event(mail1), "Contact merge failed: "
+ 				"Failed to read mail: %s", errstr);
+ 		return -1;
+ 	}
+@@ -509,7 +509,7 @@ static int lmtp_coi_mail_bodies_equal(struct mail *mai
+ 	if (mail_get_stream(mail2, &hdr_size, NULL, &input2) < 0) {
+ 		errstr = mailbox_get_last_error(mail2->box, &error);
+ 		if (error != MAIL_ERROR_EXPUNGED)
+-			e_error(mail2->event, "Contact merge failed: "
++			e_error(mail_event(mail2), "Contact merge failed: "
+ 				"Failed to read mail: %s", errstr);
+ 		return -1;
+ 	}
+@@ -534,12 +534,12 @@ static int lmtp_coi_mail_bodies_equal(struct mail *mai
+ 	i_assert(input1->eof && input2->eof);
+ 
+ 	if (input1->stream_errno != 0) {
+-		e_error(mail1->event, "Contact merge failed: "
++		e_error(mail_event(mail1), "Contact merge failed: "
+ 			"Failed to read mail: %s", i_stream_get_error(input1));
+ 		return -1;
+ 	}
+ 	if (input2->stream_errno != 0) {
+-		e_error(mail2->event, "Contact merge failed: "
++		e_error(mail_event(mail2), "Contact merge failed: "
+ 			"Failed to read mail: %s", i_stream_get_error(input2));
+ 		return -1;
+ 	}
diff --git a/mail/dovecot-coi/files/patch-src_webpush_test-webpush-message.c b/mail/dovecot-coi/files/patch-src_webpush_test-webpush-message.c
new file mode 100644
index 000000000000..4982f1a1be09
--- /dev/null
+++ b/mail/dovecot-coi/files/patch-src_webpush_test-webpush-message.c
@@ -0,0 +1,10 @@
+--- src/webpush/test-webpush-message.c.orig	2019-12-04 09:11:06 UTC
++++ src/webpush/test-webpush-message.c
+@@ -334,6 +334,6 @@ int main(void)
+ 		NULL
+ 	};
+ 
+-	env_put("TZ=UTC");
++	env_put("TZ", "UTC");
+ 	return test_run(test_functions);
+ }