From nobody Sun Dec 25 17:54:37 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ng7pj6ScPz1G7RP; Sun, 25 Dec 2022 17:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ng7pj5k8vz3C0K; Sun, 25 Dec 2022 17:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671990877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tacXi4aeZG6vzftWyNP/uuiHDDc8iixL6wMmY8mMc8k=; b=Oeq+OEMnBrZiD2LY/Sr4J0I+JmBcU9x5cxPrDP0t8uZWvOcjBqgTC14Y3HbQ+5Or4bjeTy i4SXWiAU/MYgkyGtXwCHEHrti3U49vZ0bBsrrWbozqsVnEQCKQIckxJRIb2OsNMARlYrwR aUesXPJ2ovUq0vGMNEGp1IwWwc7jvuff3MUdHNOBygpUrutvjHeJOkjS/a17DLQrWEW1xf eaHK4Rll6AcCiuxt0I2p3IRqlXnk6pXCRow2KaDWt6V8gKlMJq4+rgoqF0WGaD0jMSoJyV xNbiICkbtCwutd/gWa1bePjDONDCySbCfWuPmavfCyLbEfPk3Mx+FeVVehgfVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671990877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tacXi4aeZG6vzftWyNP/uuiHDDc8iixL6wMmY8mMc8k=; b=Puy840rrqJ08ONHVR2S0qoU+IAU3Gc6sYX9WveouA8QuIq4OZaZKH/AB7qoZmNzMkHBGHv 0uZ6VnyX2SS4fexMGzjgT7MYzJbPkKcOp9AiO/PwIEi+Pxk9AKHh/1SKucwLad6udh6K1V Ht9S+9Ub+KDihtnr82tf57ZscAx8BZacb9KZuMgUvdcVcRuRisciqXw5BdJW16WZV662Bj P4TT6uKRD5yreuLBmjhkvBxWWHiN4nCbRdWFjYVF/bzE47QFZh+lrQ5J1LNX2Rg0zJU+gs g1xGQ235tXsF5YHTWZyYiiGESdHe2GJt/bijPl+mGNqHh7NOFOBbG4TTj/NtaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671990877; a=rsa-sha256; cv=none; b=BPuEcbSyW1fEx1alxjeVBhEtmiYhccf+K4zW3AYuYxft8CP6DgScZeSUCJU3Ln6yX2Dc3X 9JmaLuPkIHV6yOCvaJc+nY9hWxLvdXGD3InHDv3wDFzDYQiM/sP9GksMmXJrrTLTDmMnhY RfhKQ5//xhQFMTiaulBUURK0MIpRbuOnZb/BWjCor0nGM9ErOjhdcXIM/iMkyVb8mnmkQs daouviSRfaeWotrKxbbcxYaZmJ47s/w3CED8wYCLmNk0lqB8gttVGEU9o+1yYNxHiN+fsc ZQVVi5kalKtRvKSKsU81BDAD7YWi09NjBLrMz1vptAZkZo1HdIUNxfheWj7b2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ng7pj4mK0z11cs; Sun, 25 Dec 2022 17:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2BPHsbsp042741; Sun, 25 Dec 2022 17:54:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BPHsbU5042740; Sun, 25 Dec 2022 17:54:37 GMT (envelope-from git) Date: Sun, 25 Dec 2022 17:54:37 GMT Message-Id: <202212251754.2BPHsbU5042740@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: b43593bdbcff - main - mail/dovecot: fix build with clang 15 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b43593bdbcffc2cca86191c52a45aebf5ad25617 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim (src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=b43593bdbcffc2cca86191c52a45aebf5ad25617 commit b43593bdbcffc2cca86191c52a45aebf5ad25617 Author: Dimitry Andric AuthorDate: 2022-12-06 18:43:51 +0000 Commit: Dimitry Andric CommitDate: 2022-12-25 17:48:02 +0000 mail/dovecot: fix build with clang 15 During an exp-run for llvm 15 (see bug 265425), it turned out that mail/dovecot failed to build with clang 15: ioloop-notify-kqueue.c:70:2: error: call to undeclared function 'i_gettimeofday'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] i_gettimeofday(&ioloop_timeval); ^ ioloop-notify-kqueue.c:70:2: note: did you mean 'gettimeofday'? /usr/include/sys/time.h:617:5: note: 'gettimeofday' declared here int gettimeofday(struct timeval *, struct timezone *); ^ ... --- test-mail-index-transaction-update.o --- test-mail-index-transaction-update.c:633:14: warning: comparison of function 'timezone' equal to a null pointer is always false [-Wtautological-pointer-compare] test_assert(timezone == 0); ^~~~~~~~ ~ ../../src/lib-test/test-common.h:20:8: note: expanded from macro 'test_assert' if (!(code)) test_assert_failed(#code, __FILE__, __LINE__); \ ^~~~ test-mail-index-transaction-update.c:633:14: note: prefix with the address-of operator to silence this warning test_assert(timezone == 0); ^ & ../../src/lib-test/test-common.h:20:8: note: expanded from macro 'test_assert' if (!(code)) test_assert_failed(#code, __FILE__, __LINE__); \ ^ test-mail-index-transaction-update.c:648:42: warning: arithmetic on a pointer to the function type 'char *(int, int)' is a GNU extension [-Wgnu-pointer-arith] hdr.day_stamp = tests[i].old_day_stamp + timezone; ^ ~~~~~~~~ test-mail-index-transaction-update.c:648:17: error: incompatible pointer to integer conversion assigning to 'uint32_t' (aka 'unsigned int') from 'char *(*)(int, int)' [-Wint-conversion] hdr.day_stamp = tests[i].old_day_stamp + timezone; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ test-mail-index-transaction-update.c:650:49: warning: arithmetic on a pointer to the function type 'char *(int, int)' is a GNU extension [-Wgnu-pointer-arith] mail_index_update_day_headers(t, tests[i].now + timezone); ^ ~~~~~~~~ test-mail-index-transaction-update.c:650:36: error: incompatible pointer to integer conversion passing 'char *(*)(int, int)' to parameter of type 'time_t' (aka 'long') [-Wint-conversion] mail_index_update_day_headers(t, tests[i].now + timezone); ^~~~~~~~~~~~~~~~~~~~~~~ ./mail-index-transaction-private.h:127:77: note: passing argument to parameter 'day_stamp' here void mail_index_update_day_headers(struct mail_index_transaction *t, time_t day_stamp); ^ test-mail-index-transaction-update.c:654:63: warning: arithmetic on a pointer to the function type 'char *(int, int)' is a GNU extension [-Wgnu-pointer-arith] test_assert_idx(new_hdr.day_stamp == tests[i].new_day_stamp + timezone, i); ^ ~~~~~~~~ ../../src/lib-test/test-common.h:26:9: note: expanded from macro 'test_assert_idx' if (!(code)) test_assert_failed_idx(#code, __FILE__, __LINE__, i); \ ^~~~ test-mail-index-transaction-update.c:654:37: warning: comparison between pointer and integer ('uint32_t' (aka 'unsigned int') and 'char *(*)(int, int)') [-Wpointer-integer-compare] test_assert_idx(new_hdr.day_stamp == tests[i].new_day_stamp + timezone, i); ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/lib-test/test-common.h:26:9: note: expanded from macro 'test_assert_idx' if (!(code)) test_assert_failed_idx(#code, __FILE__, __LINE__, i); \ ^~~~ Fix these warnings and errors by importing: https://github.com/dovecot/core/commit/e983ead775671186b3c8567d59973d2e52b678c7 https://github.com/dovecot/core/commit/1a7b1f66fe4b86cb642dbcfe5a0192c1b77d0e17 https://github.com/dovecot/core/commit/867a37fa7b74f798a931fb582214b5377f57610e PR: 268204 Approved by: maintainer timeout (2 weeks) MFH: 2022Q4 --- ..._lib-index_test-mail-index-transaction-update.c | 38 ++++++++++++++++++++++ .../files/patch-src_lib_ioloop-notify-kqueue.c | 10 ++++++ 2 files changed, 48 insertions(+) diff --git a/mail/dovecot/files/patch-src_lib-index_test-mail-index-transaction-update.c b/mail/dovecot/files/patch-src_lib-index_test-mail-index-transaction-update.c new file mode 100644 index 000000000000..25e04fd9d9de --- /dev/null +++ b/mail/dovecot/files/patch-src_lib-index_test-mail-index-transaction-update.c @@ -0,0 +1,38 @@ +--- src/lib-index/test-mail-index-transaction-update.c.orig 2022-06-14 06:55:03 UTC ++++ 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 + +@@ -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); diff --git a/mail/dovecot/files/patch-src_lib_ioloop-notify-kqueue.c b/mail/dovecot/files/patch-src_lib_ioloop-notify-kqueue.c new file mode 100644 index 000000000000..b991392f8291 --- /dev/null +++ b/mail/dovecot/files/patch-src_lib_ioloop-notify-kqueue.c @@ -0,0 +1,10 @@ +--- src/lib/ioloop-notify-kqueue.c.orig 2022-06-14 06:55:03 UTC ++++ src/lib/ioloop-notify-kqueue.c +@@ -11,6 +11,7 @@ + + #include "ioloop-private.h" + #include "llist.h" ++#include "time-util.h" + #include + #include + #include