pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/socat socat: Fix build on SmartOS
details: https://anonhg.NetBSD.org/pkgsrc/rev/241a7fbd739e
branches: trunk
changeset: 444447:241a7fbd739e
user: otis <otis%pkgsrc.org@localhost>
date: Fri Jan 08 08:47:28 2021 +0000
description:
socat: Fix build on SmartOS
diffstat:
net/socat/distinfo | 6 +++++-
net/socat/patches/patch-config.h.in | 16 ++++++++++++++++
net/socat/patches/patch-configure | 15 +++++++++++++++
net/socat/patches/patch-fdname.c | 28 ++++++++++++++++++++++++++++
net/socat/patches/patch-sysincludes.h | 16 ++++++++++++++++
5 files changed, 80 insertions(+), 1 deletions(-)
diffs (106 lines):
diff -r 273124739f1e -r 241a7fbd739e net/socat/distinfo
--- a/net/socat/distinfo Fri Jan 08 08:32:54 2021 +0000
+++ b/net/socat/distinfo Fri Jan 08 08:47:28 2021 +0000
@@ -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
diff -r 273124739f1e -r 241a7fbd739e net/socat/patches/patch-config.h.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/socat/patches/patch-config.h.in Fri Jan 08 08:47:28 2021 +0000
@@ -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 <sys/stropts.h> header file. (stream opts on SunOS)*/
+ #undef HAVE_SYS_STROPTS_H
+
++/* Define if you have the <stropts.h> header file. (stream opts on SunOS)*/
++#undef HAVE_STROPTS_H
++
+ /* Define if you have the <regex.h> header file. */
+ #undef HAVE_REGEX_H
+
diff -r 273124739f1e -r 241a7fbd739e net/socat/patches/patch-configure
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/socat/patches/patch-configure Fri Jan 08 08:47:28 2021 +0000
@@ -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"
diff -r 273124739f1e -r 241a7fbd739e net/socat/patches/patch-fdname.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/socat/patches/patch-fdname.c Fri Jan 08 08:47:28 2021 +0000
@@ -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));
diff -r 273124739f1e -r 241a7fbd739e net/socat/patches/patch-sysincludes.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/socat/patches/patch-sysincludes.h Fri Jan 08 08:47:28 2021 +0000
@@ -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 <sys/stropts.h> /* SunOS I_PUSH ... */
+ #endif
++#if HAVE_STROPTS_H
++#include <stropts.h> /* SunOS isastream() */
++#endif
+ #if HAVE_REGEX_H
+ #include <regex.h>
+ #endif
Home |
Main Index |
Thread Index |
Old Index