From nobody Fri May 05 22:06:07 2023 X-Original-To: dev-commits-ports-all@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 4QClBR6P8Sz49s5W; Fri, 5 May 2023 22:06:07 +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 4QClBR5nqhz3ks4; Fri, 5 May 2023 22:06:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683324367; 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=VsH3JKzMaTQTt6WseDqH7mn7ubQdgkUXqcEvO38r898=; b=qk8E8XoEhFukQJ9s2Rdri1yruFNbkqQ1DapSFauWTWUp6WvX1YqtWz18NG6SmcUFFPbVyf CFoha9OntpKqhw5Rm/emylEqc3/nrBV3Fclh1hq1Hu4/TXu1eazYg4fuZ0p+o2SFo+P3FM utcg0R3mrNZ3cButFSFzxB6SJJu7N4HwA6ePJv0Y0MXyZvqtid9k3kG+e6idzXjNZFEqT9 2w1MdZeul+gD/vIZbnXVF8OnYpFy3KRa5ktzweAX9/tIgkmtVhn8Kh735waezNeTltNVgj /sRQzzIVGGEfcXDIU79J/5FVlFHtbo5pEca4lsy4R3nKnS7NfNwtacWiVrQwEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683324367; 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=VsH3JKzMaTQTt6WseDqH7mn7ubQdgkUXqcEvO38r898=; b=Er8mi2kcY0XtiRRI/qSoq0ONAeU8FgC/UuLCHD2q+ZYops4PQE/OGD0RgnpfWfjiI6iC6u VnUlDrmGV0KLtTU7RIvKhAxYmuV9ZlhDotOXfL1Sf2Swjl9u08dJahPQmBLrvzGtln/s/c bJ7tDwOj/gKMoOdC7RNdbGOhw6i1WpHrgNCWBn6/Bp+VRebdaMSXjkgx1BDA1CupT8nReX 17DvqY1mZlloyfqOURymEagVcCM3UBWCJ/UyNLeASVzHTnBhGHSAZ2uB1WeuKKBy+/DJex k9cvLc77Y7hYFf2u7CqvcHC9mrk4f1C3ovsxKqWn83IPMxqutGkcjCSzbm/wiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683324367; a=rsa-sha256; cv=none; b=n3fxvKh/hstLvD0LyM0Rd8NK02ThYOaUfA148Ub/NNutz+QsO5uVSGvVaF31dHPIFyKWXl 9J7hGVtjk7YnISBL1rAAhRN6l6qyuCGS16KHpDG98Ymyk/iPMv/ruyVWIwxNp5Nu7LrQwq Rp0LclYdXRyVo1+WRuGxXIRE5wY2tXKQ258PFSiAH7o1sA5ebV/BfG5xpNAO5MIlZgHFai 1OJkaUONGBJMtjOE7ByRvtKUxo+AYeFOatSmnjcEhCGqBD85NEdhckrT+OPrFOCAI8UyHn zE4ZmXHReVUQrXpveQldaTuqavcWxN3kWkd5PoycPpyGClOSb1ue8Pj3jGtzJQ== 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 4QClBR4qlHz1BGD; Fri, 5 May 2023 22:06:07 +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 345M67V7072722; Fri, 5 May 2023 22:06:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345M67w5072721; Fri, 5 May 2023 22:06:07 GMT (envelope-from git) Date: Fri, 5 May 2023 22:06:07 GMT Message-Id: <202305052206.345M67w5072721@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Matthias Andree Subject: git: 9822791c5a46 - main - mail/mailagent: clean up fallout to fix build... List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mandree X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9822791c5a46eb7efe828df88fe83b90f000cd16 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mandree: URL: https://cgit.FreeBSD.org/ports/commit/?id=9822791c5a46eb7efe828df88fe83b90f000cd16 commit 9822791c5a46eb7efe828df88fe83b90f000cd16 Author: Matthias Andree AuthorDate: 2023-05-05 22:01:41 +0000 Commit: Matthias Andree CommitDate: 2023-05-05 22:06:03 +0000 mail/mailagent: clean up fallout to fix build... patch parser.c's check_fatal to avoid the int-conversion errors, and quench some warnings. Untested on FreeBSD 14, but tested on 13.2 with clang15. https://pkg-status.freebsd.org/beefy18/data/main-amd64-default/p54373d87b552_s4194bbb34c/logs/mailagent-3.1.106.log Note the code uses K&R style function declarations, not proper prototypes, which upset newer versions of the clang compiler. So pretend this were C99 code, too. While here, propagate CC to the build. --- mail/mailagent/Makefile | 5 +++- mail/mailagent/files/patch-agent-filter-io.c | 16 ++++++++--- mail/mailagent/files/patch-agent-pl-termios_ph.c | 36 ++++++++++++++++++++++++ mail/mailagent/files/patch-agent_filter_parser.c | 27 ++++++++++++++++++ 4 files changed, 79 insertions(+), 5 deletions(-) diff --git a/mail/mailagent/Makefile b/mail/mailagent/Makefile index efa14ec3dc13..36346dc20b8d 100644 --- a/mail/mailagent/Makefile +++ b/mail/mailagent/Makefile @@ -1,5 +1,6 @@ PORTNAME= mailagent PORTVERSION= 3.1.106 +PORTREVISION= 1 CATEGORIES= mail MAINTAINER= ports@FreeBSD.org @@ -10,6 +11,7 @@ LICENSE= ART10 LICENSE_FILE= ${WRKSRC}/Artistic USES= perl5 tar:bzip2 +USE_CSTD= c99 USE_GITHUB= yes GH_ACCOUNT= rmanfredi GH_TAGNAME= 9a14a15 @@ -20,7 +22,8 @@ HAS_CONFIGURE= yes CONFIGURE_SCRIPT= Configure CONFIGURE_ARGS= -dres \ -Dperlpath='${PERL}' \ - -Dccflags='${CFLAGS}' \ + -Dcc='${CC}' \ + -Dccflags='${CFLAGS} -Wno-unknown-warning-option -Wno-unknown-warning -Wno-format-nonliteral -Wno-deprecated-non-prototype' \ -Dd_flockonly='define' \ -Dutmp='/var/run/utmp' \ -Dorgname='${ORGFILE}' \ diff --git a/mail/mailagent/files/patch-agent-filter-io.c b/mail/mailagent/files/patch-agent-filter-io.c index 77f213059c94..eec11ff579fa 100644 --- a/mail/mailagent/files/patch-agent-filter-io.c +++ b/mail/mailagent/files/patch-agent-filter-io.c @@ -1,6 +1,14 @@ ---- ./agent/filter/io.c.orig 2008-08-19 17:44:07.000000000 +0900 -+++ ./agent/filter/io.c 2014-08-14 01:59:33.537704696 +0900 -@@ -141,6 +141,9 @@ +--- agent/filter/io.c.orig 2020-04-09 14:16:46 UTC ++++ agent/filter/io.c +@@ -100,6 +100,7 @@ + #include + #include + #include ++#include + + #ifdef I_UNISTD + #include /* R_OK and friends */ +@@ -141,6 +142,9 @@ extern char *malloc(); /* Memory allocation */ #ifdef I_SYS_IOCTL #include #endif @@ -10,7 +18,7 @@ /* * The following should be defined in . -@@ -739,7 +742,7 @@ +@@ -739,7 +743,7 @@ char *location; */ char **envp; /* Environment pointer */ diff --git a/mail/mailagent/files/patch-agent-pl-termios_ph.c b/mail/mailagent/files/patch-agent-pl-termios_ph.c new file mode 100644 index 000000000000..8c53b57e1999 --- /dev/null +++ b/mail/mailagent/files/patch-agent-pl-termios_ph.c @@ -0,0 +1,36 @@ +--- agent/pl/termios/termios_ph.c.orig 2020-04-09 16:16:46.000000000 +0200 ++++ agent/pl/termios/termios_ph.c 2023-05-05 23:42:03.979804000 +0200 +@@ -33,7 +33,7 @@ + #define PADSTR "..pad.. " /* Pad string, for comment */ + + #include "config.h" +- ++#include + #include + + #ifdef I_STRING +@@ -85,8 +85,8 @@ + char pack[MAX_LEN]; + char fields[MAX_LEN]; + char buf[MAX_LEN]; +- int row_off = (int) &win->ws_row; /* Offset of ws_row */ +- int col_off = (int) &win->ws_col; /* Offset of ws_col */ ++ int row_off = offsetof(struct winsize, ws_row); ++ int col_off = offsetof(struct winsize, ws_col); + int row_len = sizeof(win->ws_row); /* Size of ws_row */ + int col_len = sizeof(win->ws_col); /* Size of ws_col */ + int last_off = 0; /* Last offset in pack format */ +@@ -142,10 +142,10 @@ + /* + * Spit out perl definitions. + */ +- printf("$TIOCGWINSZ = 0x%x;\t# The TIOCGWINSZ ioctl()\n", TIOCGWINSZ); ++ printf("$TIOCGWINSZ = 0x%lx;\t# The TIOCGWINSZ ioctl()\n", (long)TIOCGWINSZ); + printf("$packfmt = '%s';\t\t# %s\n", pack, comment); +- printf("$length = %d;\t\t\t# sizeof(struct winsize)\n", +- sizeof(struct winsize)); ++ printf("$length = %lu;\t\t\t# sizeof(struct winsize)\n", ++ (unsigned long)sizeof(struct winsize)); + printf("@fields = %s;\n", fields); + #else + printf("$TIOCGWINSZ = undef;\t# No termios\n"); diff --git a/mail/mailagent/files/patch-agent_filter_parser.c b/mail/mailagent/files/patch-agent_filter_parser.c new file mode 100644 index 000000000000..01a8b7bc076b --- /dev/null +++ b/mail/mailagent/files/patch-agent_filter_parser.c @@ -0,0 +1,27 @@ +--- agent/filter/parser.c.orig 2020-04-09 14:16:46 UTC ++++ agent/filter/parser.c +@@ -327,10 +327,7 @@ char *file; + } + + /* VARARGS3 */ +-private void check_fatal(flags, reason, arg1, arg2, arg3, arg4, arg5) +-int flags; +-char *reason; +-long arg1, arg2, arg3, arg4, arg5; ++private void check_fatal(int flags, char *reason, char *arg1) + { + /* Die with a fatal error if MAY_PANIC is specified in flags, otherwise + * simply log the error. +@@ -339,10 +336,10 @@ long arg1, arg2, arg3, arg4, arg5; + char buffer[MAX_STRING]; + + if (flags & MAY_PANIC) +- fatal(reason, arg1, arg2, arg3, arg4, arg5); ++ fatal(reason, arg1); + + sprintf(buffer, "ERROR %s", reason); +- add_log(1, buffer, arg1, arg2, arg3, arg4, arg5); ++ add_log(1, buffer, arg1); + } + + private int check_perm(file, flags)