diff options
author | otis <otis@pkgsrc.org> | 2021-01-08 08:47:28 +0000 |
---|---|---|
committer | otis <otis@pkgsrc.org> | 2021-01-08 08:47:28 +0000 |
commit | e9aa05ad291196d6cd1a008363d9f26ce73d3b24 (patch) | |
tree | 680e59bf347aedec0c991e8306fb41bfe8e3895f /net/socat | |
parent | cd38ad0c312d0b9bdc0afdfe17048bf1c9facf70 (diff) | |
download | pkgsrc-e9aa05ad291196d6cd1a008363d9f26ce73d3b24.tar.gz |
socat: Fix build on SmartOS
Diffstat (limited to 'net/socat')
-rw-r--r-- | net/socat/distinfo | 6 | ||||
-rw-r--r-- | net/socat/patches/patch-config.h.in | 16 | ||||
-rw-r--r-- | net/socat/patches/patch-configure | 15 | ||||
-rw-r--r-- | net/socat/patches/patch-fdname.c | 28 | ||||
-rw-r--r-- | net/socat/patches/patch-sysincludes.h | 16 |
5 files changed, 80 insertions, 1 deletions
diff --git a/net/socat/distinfo b/net/socat/distinfo index 3aa97b2a42b..bd9c194b7cf 100644 --- a/net/socat/distinfo +++ b/net/socat/distinfo @@ -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 --git a/net/socat/patches/patch-config.h.in b/net/socat/patches/patch-config.h.in new file mode 100644 index 00000000000..dc31a1e515d --- /dev/null +++ b/net/socat/patches/patch-config.h.in @@ -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 --git a/net/socat/patches/patch-configure b/net/socat/patches/patch-configure new file mode 100644 index 00000000000..5632967a4b6 --- /dev/null +++ b/net/socat/patches/patch-configure @@ -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 --git a/net/socat/patches/patch-fdname.c b/net/socat/patches/patch-fdname.c new file mode 100644 index 00000000000..eb5d97de69c --- /dev/null +++ b/net/socat/patches/patch-fdname.c @@ -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 --git a/net/socat/patches/patch-sysincludes.h b/net/socat/patches/patch-sysincludes.h new file mode 100644 index 00000000000..5d0d7aed3dc --- /dev/null +++ b/net/socat/patches/patch-sysincludes.h @@ -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 |