Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id B1B8A1A9217 for ; Fri, 8 Jan 2021 08:47:31 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id EA83584D53; Fri, 8 Jan 2021 08:47:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 3088E84D3D for ; Fri, 8 Jan 2021 08:47:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id Ok0FUuKDwCxI for ; Fri, 8 Jan 2021 08:47:29 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 57EA784CBC for ; Fri, 8 Jan 2021 08:47:29 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 455E8FA9D; Fri, 8 Jan 2021 08:47:29 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1610095649244740" MIME-Version: 1.0 Date: Fri, 8 Jan 2021 08:47:29 +0000 From: "Juraj Lutter" Subject: CVS commit: pkgsrc/net/socat To: pkgsrc-changes@NetBSD.org Reply-To: otis@netbsd.org X-Mailer: log_accum Message-Id: <20210108084729.455E8FA9D@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1610095649244740 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: otis Date: Fri Jan 8 08:47:29 UTC 2021 Modified Files: pkgsrc/net/socat: distinfo Added Files: pkgsrc/net/socat/patches: patch-config.h.in patch-configure patch-fdname.c patch-sysincludes.h Log Message: socat: Fix build on SmartOS To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 pkgsrc/net/socat/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/net/socat/patches/patch-config.h.in \ pkgsrc/net/socat/patches/patch-fdname.c \ pkgsrc/net/socat/patches/patch-sysincludes.h cvs rdiff -u -r0 -r1.4 pkgsrc/net/socat/patches/patch-configure Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1610095649244740 Content-Disposition: inline Content-Length: 4387 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/net/socat/distinfo diff -u pkgsrc/net/socat/distinfo:1.29 pkgsrc/net/socat/distinfo:1.30 --- pkgsrc/net/socat/distinfo:1.29 Wed Jan 6 15:12:31 2021 +++ pkgsrc/net/socat/distinfo Fri Jan 8 08:47:28 2021 @@ -1,6 +1,10 @@ -$NetBSD: distinfo,v 1.29 2021/01/06 15:12:31 leot Exp $ +$NetBSD: distinfo,v 1.30 2021/01/08 08:47:28 otis Exp $ SHA1 (socat-1.7.4.0.tar.gz) = d85bf661e445d6a8a892be3bfffc155fac3ede76 RMD160 (socat-1.7.4.0.tar.gz) = 57d29be7075d7e7c14de15320a850257a0654f5c SHA512 (socat-1.7.4.0.tar.gz) = 0e500593f4086a9d94634232f8d5aa79eb57f85cb5f05e3bf0ae06baebd28c7c5d443ab71337d909a38f83538136119b89a8091681a19754b93229c42c23eb05 Size (socat-1.7.4.0.tar.gz) = 647864 bytes +SHA1 (patch-config.h.in) = e0cb8c4075ca96863e458f1c2384dc7a6b69e928 +SHA1 (patch-configure) = ba75b5f192c1359220bea019fa50603b2b5c7c3a +SHA1 (patch-fdname.c) = c59bd921989e4d84375764fdd707b7cd6c49ceba +SHA1 (patch-sysincludes.h) = d48307ade6bc82bea946920e7336bc5329714c08 Added files: Index: pkgsrc/net/socat/patches/patch-config.h.in diff -u /dev/null pkgsrc/net/socat/patches/patch-config.h.in:1.1 --- /dev/null Fri Jan 8 08:47:29 2021 +++ pkgsrc/net/socat/patches/patch-config.h.in Fri Jan 8 08:47:29 2021 @@ -0,0 +1,16 @@ +$NetBSD: patch-config.h.in,v 1.1 2021/01/08 08:47:29 otis Exp $ + +Add define for newly added check. + +--- config.h.in.orig 2021-01-03 18:23:22.000000000 +0000 ++++ config.h.in +@@ -309,6 +309,9 @@ + /* Define if you have the header file. (stream opts on SunOS)*/ + #undef HAVE_SYS_STROPTS_H + ++/* Define if you have the header file. (stream opts on SunOS)*/ ++#undef HAVE_STROPTS_H ++ + /* Define if you have the header file. */ + #undef HAVE_REGEX_H + Index: pkgsrc/net/socat/patches/patch-fdname.c diff -u /dev/null pkgsrc/net/socat/patches/patch-fdname.c:1.1 --- /dev/null Fri Jan 8 08:47:29 2021 +++ pkgsrc/net/socat/patches/patch-fdname.c Fri Jan 8 08:47:29 2021 @@ -0,0 +1,28 @@ +$NetBSD: patch-fdname.c,v 1.1 2021/01/08 08:47:29 otis Exp $ + +Use correct prototype for getprotobynumber_r() on SunOS + +--- fdname.c.orig 2021-01-03 18:23:22.000000000 +0000 ++++ fdname.c +@@ -232,7 +232,7 @@ int sockname(int fd, FILE *outfile, char + /*Linux struct ifreq ifc = {{{ 0 }}};*/ + struct ifreq ifc = {{ 0 }}; + #endif +- int rc; ++ int rc = 0; + + #if defined(SO_PROTOCOL) || defined(SO_PROTOTYPE) + optlen = sizeof(proto); +@@ -254,7 +254,12 @@ int sockname(int fd, FILE *outfile, char + + #if defined(SO_PROTOCOL) || defined(SO_PROTOTYPE) + #if HAVE_GETPROTOBYNUMBER_R ++#if defined(__sun) ++ protoentp = getprotobynumber_r(proto, &protoent, protoname, sizeof(protoname)); ++ rc = errno; ++#else + rc = getprotobynumber_r(proto, &protoent, protoname, sizeof(protoname), &protoentp); ++#endif + if (protoentp == NULL) { + Warn2("sockname(): getprotobynumber_r(proto=%d, ...): %s", + proto, strerror(rc)); Index: pkgsrc/net/socat/patches/patch-sysincludes.h diff -u /dev/null pkgsrc/net/socat/patches/patch-sysincludes.h:1.1 --- /dev/null Fri Jan 8 08:47:29 2021 +++ pkgsrc/net/socat/patches/patch-sysincludes.h Fri Jan 8 08:47:29 2021 @@ -0,0 +1,16 @@ +$NetBSD: patch-sysincludes.h,v 1.1 2021/01/08 08:47:29 otis Exp $ + +Include stropts.h when it is present. + +--- sysincludes.h.orig 2021-01-03 18:23:22.000000000 +0000 ++++ sysincludes.h +@@ -163,6 +163,9 @@ + #if HAVE_SYS_STROPTS_H + #include /* SunOS I_PUSH ... */ + #endif ++#if HAVE_STROPTS_H ++#include /* SunOS isastream() */ ++#endif + #if HAVE_REGEX_H + #include + #endif Index: pkgsrc/net/socat/patches/patch-configure diff -u /dev/null pkgsrc/net/socat/patches/patch-configure:1.4 --- /dev/null Fri Jan 8 08:47:29 2021 +++ pkgsrc/net/socat/patches/patch-configure Fri Jan 8 08:47:29 2021 @@ -0,0 +1,15 @@ +$NetBSD: patch-configure,v 1.4 2021/01/08 08:47:29 otis Exp $ + +Check for stropts.h for usage on SunOS + +--- configure.orig 2021-01-03 18:23:22.000000000 +0000 ++++ configure +@@ -4034,7 +4034,7 @@ fi + + done + +-for ac_header in util.h bsd/libutil.h libutil.h sys/stropts.h regex.h ++for ac_header in util.h bsd/libutil.h libutil.h stropts.h sys/stropts.h regex.h + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" --_----------=_1610095649244740--