From nobody Sun May 21 14:48:50 2023 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 4QPNkW1Bknz4CZwJ; Sun, 21 May 2023 14:48:51 +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 4QPNkW0X3cz3Gxt; Sun, 21 May 2023 14:48:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684680531; 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=Exr8fVyNjm4yNXJTvgHqIlOjQWmJ/YjdwVv1vLDSlMk=; b=h9SlLU3V91y91TeXiqywvP7Hx9qgPpmcfMYHg3RmYn5r2h7tDmAY4vX3vI8PoWRUoDypyo 9mYD15cG0b6AbdqpWdk1ynt0R2X14H55A604yZBe+C6N+qxYehRx3Fe8myJoBiWNj+Qgm8 7nhd/4uvUtzlviKhMQJH6tzFBDbkD2dLpPWZklND6ileg8SGjTMwebRbgaXLQnXI5W1Yd9 37v3H42GXRwAC9x/nAAJYgn9XWvy2hwNi6LCnFD0AqcGyixSgkE10bCyUXQ+F9+H32Chns H1nHiXzHxrjpD8eRe3mYBh2J0FpFvHwDc2JG21+fTLryPLr/SiY/iLSnaWjoeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684680531; 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=Exr8fVyNjm4yNXJTvgHqIlOjQWmJ/YjdwVv1vLDSlMk=; b=pk7f/OBuAFY/W4dWVy5qE24zkq5ncw60ZgP7Qg3gMM6U5wbpPBU2gnaKm9hZaLcup1qqHe gUBLQfbi4CLkdgtags+ZlNak9dNHUZGZOqqFWkrteY5S4CyEWABjxIW/IV3fphf2/Xtk7k tHC2lkXXTWEWjANF+uNnNBDLlmUQwbqhGdjmYRktm09PRFDAVYS0ZpbMWhQzrek8Fjj0Ob 77REwvn3uA/SiK6MHyqstA2d3JWK3O84C2ObtjvjELKeXEX3ir1I+0zhcLaN0MeWSnyVb7 secJ+1T5dF1HzhTIzWgm/czX/FR1dgpLOQ0vXJn2sr20MdqaF9wa0uMkVxPYrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684680531; a=rsa-sha256; cv=none; b=r8hYG6WOc/sHYKj+4mEG7cZNu+yrMpxC9CnAIUwuqIfCSZ+e4LV0iquVrcMgrTF5okUHf+ UUO6NOlq52CC3gIu1T1ZLeGqF8L+vmeR9A1Or2sSF88RbvlTn4wOu5SMcux+TlAF32SoVT 8KtWU3zRyk8ysyJNvsq+s8PbwLtWVka8vrxw/YXB2qnmo2qh0JNIVkUisK6Pq/6oBVvM9a NMUwVm29LDkUUKkCNZKHbkCgy8g7l0dld0rD5ZCjqQsvh2vAOX3EIihiLEuwAy2RyAsJAk kNWdY1UQDui7c+xkkeYsiqOzDyYDTWBqCt/e3DViz1gvh46Bwqsbckr/wwkcXA== 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 4QPNkV6c8DzvGp; Sun, 21 May 2023 14:48:50 +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 34LEmovL001017; Sun, 21 May 2023 14:48:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34LEmotv001016; Sun, 21 May 2023 14:48:50 GMT (envelope-from git) Date: Sun, 21 May 2023 14:48:50 GMT Message-Id: <202305211448.34LEmotv001016@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: 7c711691b378 - main - mail/panda-cclient: fix build with clang 16 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: 7c711691b378bee218c41da6b803b655f2039d2d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=7c711691b378bee218c41da6b803b655f2039d2d commit 7c711691b378bee218c41da6b803b655f2039d2d Author: Dimitry Andric AuthorDate: 2023-05-20 19:25:40 +0000 Commit: Dimitry Andric CommitDate: 2023-05-21 14:47:58 +0000 mail/panda-cclient: fix build with clang 16 Clang 16 has a new error about incompatible function types, which shows up when building mail/panda-cclient: news.c:370:36: error: incompatible function pointer types passing 'int (struct dirent *)' to parameter of type 'int (*)(const struct dirent *)' [-Wincompatible-function-pointer-types] if ((nmsgs = scandir (tmp,&names,news_select,news_numsort)) >= 0) { ^~~~~~~~~~~ /usr/include/dirent.h:127:12: note: passing argument to parameter here int (*)(const struct dirent *), int (*)(const struct dirent **, ^ news.c:370:48: error: incompatible function pointer types passing 'int (const void *, const void *)' to parameter of type 'int (*)(const struct dirent **, const struct dirent **)' [-Wincompatible-function-pointer-types] if ((nmsgs = scandir (tmp,&names,news_select,news_numsort)) >= 0) { ^~~~~~~~~~~~ /usr/include/dirent.h:127:44: note: passing argument to parameter here int (*)(const struct dirent *), int (*)(const struct dirent **, ^ This is because the prototypes for the scandir(3) 'select' and 'compar' callback function parameters do not match the declarations in . The same occurs in a few other files under src/osdep/unix. Fix these by using the correct parameter types for the callback functions. PR: 271539 Approved by: thierry (maintainer) MFH: 2023Q2 --- mail/panda-cclient/Makefile | 2 +- mail/panda-cclient/files/patch-src_osdep_unix_mh.c | 35 ++++++++++++++ .../panda-cclient/files/patch-src_osdep_unix_mix.c | 54 ++++++++++++++++++++++ mail/panda-cclient/files/patch-src_osdep_unix_mx.c | 35 ++++++++++++++ .../files/patch-src_osdep_unix_news.c | 35 ++++++++++++++ 5 files changed, 160 insertions(+), 1 deletion(-) diff --git a/mail/panda-cclient/Makefile b/mail/panda-cclient/Makefile index 87d9d5022b98..c81ce8b1ea75 100644 --- a/mail/panda-cclient/Makefile +++ b/mail/panda-cclient/Makefile @@ -1,6 +1,6 @@ PORTNAME= cclient PORTVERSION= 20130621 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= mail devel PKGNAMEPREFIX= panda- diff --git a/mail/panda-cclient/files/patch-src_osdep_unix_mh.c b/mail/panda-cclient/files/patch-src_osdep_unix_mh.c new file mode 100644 index 000000000000..c321fa221ba3 --- /dev/null +++ b/mail/panda-cclient/files/patch-src_osdep_unix_mh.c @@ -0,0 +1,35 @@ +--- src/osdep/unix/mh.c.orig 2022-04-17 00:12:02 UTC ++++ src/osdep/unix/mh.c +@@ -100,8 +100,8 @@ long mh_append (MAILSTREAM *stream,char *mailbox,appen + long options); + long mh_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data); + +-int mh_select (struct direct *name); +-int mh_numsort (const void *d1,const void *d2); ++int mh_select (const struct direct *name); ++int mh_numsort (const struct direct **d1,const struct direct **d2); + char *mh_file (char *dst,char *name); + long mh_canonicalize (char *pattern,char *ref,char *pat); + void mh_setdate (char *file,MESSAGECACHE *elt); +@@ -1191,7 +1191,7 @@ long mh_append (MAILSTREAM *stream,char *mailbox,appen + * Returns: T to use file name, NIL to skip it + */ + +-int mh_select (struct direct *name) ++int mh_select (const struct direct *name) + { + char c; + char *s = name->d_name; +@@ -1206,10 +1206,9 @@ int mh_select (struct direct *name) + * Returns: negative if d1 < d2, 0 if d1 == d2, postive if d1 > d2 + */ + +-int mh_numsort (const void *d1,const void *d2) ++int mh_numsort (const struct direct **d1,const struct direct **d2) + { +- return atoi ((*(struct direct **) d1)->d_name) - +- atoi ((*(struct direct **) d2)->d_name); ++ return atoi ((*d1)->d_name) - atoi ((*d2)->d_name); + } + + diff --git a/mail/panda-cclient/files/patch-src_osdep_unix_mix.c b/mail/panda-cclient/files/patch-src_osdep_unix_mix.c new file mode 100644 index 000000000000..f227c245314b --- /dev/null +++ b/mail/panda-cclient/files/patch-src_osdep_unix_mix.c @@ -0,0 +1,54 @@ +--- src/osdep/unix/mix.c.orig 2022-04-17 00:12:02 UTC ++++ src/osdep/unix/mix.c +@@ -123,7 +123,7 @@ long mix_rename (MAILSTREAM *stream,char *old,char *ne + long mix_create (MAILSTREAM *stream,char *mailbox); + long mix_delete (MAILSTREAM *stream,char *mailbox); + long mix_rename (MAILSTREAM *stream,char *old,char *newname); +-int mix_rselect (struct direct *name); ++int mix_rselect (const struct direct *name); + MAILSTREAM *mix_open (MAILSTREAM *stream); + void mix_close (MAILSTREAM *stream,long options); + void mix_abort (MAILSTREAM *stream); +@@ -138,8 +138,8 @@ long mix_expunge (MAILSTREAM *stream,char *sequence,lo + long mix_ping (MAILSTREAM *stream); + void mix_check (MAILSTREAM *stream); + long mix_expunge (MAILSTREAM *stream,char *sequence,long options); +-int mix_select (struct direct *name); +-int mix_msgfsort (const void *d1,const void *d2); ++int mix_select (const struct direct *name); ++int mix_msgfsort (const struct direct **d1,const struct direct **d2); + long mix_addset (SEARCHSET **set,unsigned long start,unsigned long size); + long mix_burp (MAILSTREAM *stream,MIXBURP *burp,unsigned long *reclaimed); + long mix_burp_check (SEARCHSET *set,size_t size,char *file); +@@ -585,7 +585,7 @@ long mix_rename (MAILSTREAM *stream,char *old,char *ne + * Returns: T if mix file name, NIL otherwise + */ + +-int mix_rselect (struct direct *name) ++int mix_rselect (const struct direct *name) + { + return mix_dirfmttest (name->d_name); + } +@@ -1150,7 +1150,7 @@ long mix_expunge (MAILSTREAM *stream,char *sequence,lo + * ".mix" with no suffix was used by experimental versions + */ + +-int mix_select (struct direct *name) ++int mix_select (const struct direct *name) + { + char c,*s; + /* make sure name has prefix */ +@@ -1169,10 +1169,10 @@ int mix_select (struct direct *name) + * Returns: -1 if d1 < d2, 0 if d1 == d2, 1 d1 > d2 + */ + +-int mix_msgfsort (const void *d1,const void *d2) ++int mix_msgfsort (const struct direct **d1,const struct direct **d2) + { +- char *n1 = (*(struct direct **) d1)->d_name + sizeof (MIXNAME) - 1; +- char *n2 = (*(struct direct **) d2)->d_name + sizeof (MIXNAME) - 1; ++ char *n1 = (*d1)->d_name + sizeof (MIXNAME) - 1; ++ char *n2 = (*d2)->d_name + sizeof (MIXNAME) - 1; + return compare_ulong (*n1 ? strtoul (n1,NIL,16) : 0, + *n2 ? strtoul (n2,NIL,16) : 0); + } diff --git a/mail/panda-cclient/files/patch-src_osdep_unix_mx.c b/mail/panda-cclient/files/patch-src_osdep_unix_mx.c new file mode 100644 index 000000000000..99ccd1c02ff6 --- /dev/null +++ b/mail/panda-cclient/files/patch-src_osdep_unix_mx.c @@ -0,0 +1,35 @@ +--- src/osdep/unix/mx.c.orig 2022-04-17 00:12:02 UTC ++++ src/osdep/unix/mx.c +@@ -98,8 +98,8 @@ long mx_append_msg (MAILSTREAM *stream,char *flags,MES + long mx_append_msg (MAILSTREAM *stream,char *flags,MESSAGECACHE *elt, + STRING *st,SEARCHSET *set); + +-int mx_select (struct direct *name); +-int mx_numsort (const void *d1,const void *d2); ++int mx_select (const struct direct *name); ++int mx_numsort (const struct direct **d1,const struct direct **d2); + char *mx_file (char *dst,char *name); + long mx_lockindex (MAILSTREAM *stream); + void mx_unlockindex (MAILSTREAM *stream); +@@ -1110,7 +1110,7 @@ long mx_append_msg (MAILSTREAM *stream,char *flags,MES + * Returns: T to use file name, NIL to skip it + */ + +-int mx_select (struct direct *name) ++int mx_select (const struct direct *name) + { + char c; + char *s = name->d_name; +@@ -1125,10 +1125,9 @@ int mx_select (struct direct *name) + * Returns: negative if d1 < d2, 0 if d1 == d2, postive if d1 > d2 + */ + +-int mx_numsort (const void *d1,const void *d2) ++int mx_numsort (const struct direct **d1,const struct direct **d2) + { +- return atoi ((*(struct direct **) d1)->d_name) - +- atoi ((*(struct direct **) d2)->d_name); ++ return atoi ((*d1)->d_name) - atoi ((*d2)->d_name); + } + + diff --git a/mail/panda-cclient/files/patch-src_osdep_unix_news.c b/mail/panda-cclient/files/patch-src_osdep_unix_news.c new file mode 100644 index 000000000000..56491baea1a6 --- /dev/null +++ b/mail/panda-cclient/files/patch-src_osdep_unix_news.c @@ -0,0 +1,35 @@ +--- src/osdep/unix/news.c.orig 2022-04-17 00:12:02 UTC ++++ src/osdep/unix/news.c +@@ -76,8 +76,8 @@ MAILSTREAM *news_open (MAILSTREAM *stream); + long news_delete (MAILSTREAM *stream,char *mailbox); + long news_rename (MAILSTREAM *stream,char *old,char *newname); + MAILSTREAM *news_open (MAILSTREAM *stream); +-int news_select (struct direct *name); +-int news_numsort (const void *d1,const void *d2); ++int news_select (const struct direct *name); ++int news_numsort (const struct direct **d1,const struct direct **d2); + void news_close (MAILSTREAM *stream,long options); + void news_fast (MAILSTREAM *stream,char *sequence,long flags); + void news_flags (MAILSTREAM *stream,char *sequence,long flags); +@@ -402,7 +402,7 @@ MAILSTREAM *news_open (MAILSTREAM *stream) + * Returns: T to use file name, NIL to skip it + */ + +-int news_select (struct direct *name) ++int news_select (const struct direct *name) + { + char c; + char *s = name->d_name; +@@ -417,10 +417,9 @@ int news_select (struct direct *name) + * Returns: negative if d1 < d2, 0 if d1 == d2, postive if d1 > d2 + */ + +-int news_numsort (const void *d1,const void *d2) ++int news_numsort (const struct direct **d1,const struct direct **d2) + { +- return atoi ((*(struct direct **) d1)->d_name) - +- atoi ((*(struct direct **) d2)->d_name); ++ return atoi ((*d1)->d_name) - atoi ((*d2)->d_name); + } + +