On Wed, Jan 11 2023, Klemens Nanni <k...@openbsd.org> wrote: > On Sun, Jan 08, 2023 at 10:25:28PM +0100, Jeremie Courreges-Anglas wrote: >> > https://wxcvbn.org/~jca/build-failures/amd64-clang/2023-01-03/security/libssh.txt >> [patch] >> /usr/ports/pobj/libssh-0.10.4/libssh-0.10.4/examples/sshnetcat.c:241:18: >> error: a function declaration without a prototype is deprecated in all >> versions of C [-Werror,-Wstrict-prototypes] >> void cleanup_pcap(){ >> ^ >> void > > Same warning as www/varnish, but here the examples fail which we don't > package anyway! > > So drop the existing patch that links to an old/inaccessible issue > (looks like phabricator which now redirects to gitlab, so broken) and > do not build examples at all -- 59 less .c files to compile. > > No WANTLIB, PLIST or dynamic export changes. > Builds on amd64 with jca's clang 15 sets.
This was already fixed by dropping -Werror. > Feedback? OK? If dropping examples doesn't impact tests then go for it. > Index: Makefile > =================================================================== > RCS file: /cvs/ports/security/libssh/Makefile,v > retrieving revision 1.31 > diff -u -p -r1.31 Makefile > --- Makefile 11 Sep 2022 23:44:28 -0000 1.31 > +++ Makefile 11 Jan 2023 20:58:51 -0000 > @@ -25,6 +25,7 @@ WRKBUILD = ${WRKDIST}/build > BUILD_DEPENDS = devel/cmocka \ > devel/argp-standalone > > -CONFIGURE_ARGS += -DUNIT_TESTING=ON > +CONFIGURE_ARGS += -DUNIT_TESTING=ON \ > + -DWITH_EXAMPLES=OFF > > .include <bsd.port.mk> > Index: patches/patch-examples_sshd_direct-tcpip_c > =================================================================== > RCS file: patches/patch-examples_sshd_direct-tcpip_c > diff -N patches/patch-examples_sshd_direct-tcpip_c > --- patches/patch-examples_sshd_direct-tcpip_c 1 Sep 2022 18:54:17 > -0000 1.4 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,28 +0,0 @@ > -Fix macro collision with __attribute__ ((__unused__)) in system-wide headers. > -Problem known upstream: https://bugs.libssh.org/T175 > - > -Index: examples/sshd_direct-tcpip.c > ---- examples/sshd_direct-tcpip.c.orig > -+++ examples/sshd_direct-tcpip.c > -@@ -41,16 +41,16 @@ clients must be made or how a client should react. > - > - #define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0) > - > --#ifndef __unused__ > -+#ifndef ssh__unused > - # ifdef HAVE_UNUSED_ATTRIBUTE > --# define __unused__ __attribute__((unused)) > -+# define ssh__unused __attribute__((unused)) > - # else /* HAVE_UNUSED_ATTRIBUTE */ > --# define __unused__ > -+# define ssh__unused > - # endif /* HAVE_UNUSED_ATTRIBUTE */ > --#endif /* __unused__ */ > -+#endif /* ssh__unused */ > - > - #ifndef UNUSED_PARAM > --#define UNUSED_PARAM(param) param __unused__ > -+#define UNUSED_PARAM(param) param ssh__unused > - #endif /* UNUSED_PARAM */ > - > - #ifndef KEYS_FOLDER > -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE