Sun Jan 27 12:35:17 2008 UTC ()
Fixed a segmentation fault when calling "socat -hhh".


(rillig)
diff -r1.9 -r1.10 pkgsrc/net/socat/distinfo
diff -r0 -r1.1 pkgsrc/net/socat/patches/patch-ab
diff -r0 -r1.1 pkgsrc/net/socat/patches/patch-ac

cvs diff -r1.9 -r1.10 pkgsrc/net/socat/distinfo (expand / switch to unified diff)

--- pkgsrc/net/socat/distinfo 2007/04/09 09:47:48 1.9
+++ pkgsrc/net/socat/distinfo 2008/01/27 12:35:16 1.10
@@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
1$NetBSD: distinfo,v 1.9 2007/04/09 09:47:48 adrianp Exp $ 1$NetBSD: distinfo,v 1.10 2008/01/27 12:35:16 rillig Exp $
2 2
3SHA1 (socat-1.6.0.0.tar.gz) = d7e20e67c2691926e965272520a844644226f0b9 3SHA1 (socat-1.6.0.0.tar.gz) = d7e20e67c2691926e965272520a844644226f0b9
4RMD160 (socat-1.6.0.0.tar.gz) = 37b4f46e9e6ae49c2bf3a36ba94d3d63318a9826 4RMD160 (socat-1.6.0.0.tar.gz) = 37b4f46e9e6ae49c2bf3a36ba94d3d63318a9826
5Size (socat-1.6.0.0.tar.gz) = 427187 bytes 5Size (socat-1.6.0.0.tar.gz) = 427187 bytes
6SHA1 (patch-aa) = 60d8dc14e1b15a7da5efb717b5bffd7338f86158 6SHA1 (patch-aa) = 60d8dc14e1b15a7da5efb717b5bffd7338f86158
 7SHA1 (patch-ab) = 8b8d9f86b7d0d08c5c8870ace5c2fb5a4515c95a
 8SHA1 (patch-ac) = 981f623c32f3e03120aa86c3520bf8527afb5221

File Added: pkgsrc/net/socat/patches/Attic/patch-ab
$NetBSD: patch-ab,v 1.1 2008/01/27 12:35:17 rillig Exp $

The construction #if FOO #elif FOO #endif is almost always wrong.

--- xiohelp.c.orig	2007-02-05 22:15:57.000000000 +0100
+++ xiohelp.c	2008-01-27 13:29:19.000000000 +0100
@@ -25,7 +25,7 @@ static const char *optiontypenames[] = {
 	"OFF_T",	"OFF64_T",
 #if HAVE_STRUCT_IP_MREQN
 					"STRUCT-IP_MREQN",
-#elif HAVE_STRUCT_IP_MREQN
+#elif HAVE_STRUCT_IP_MREQ
 					"STRUCT-IP_MREQ",
 #endif
 							"IP4NAME",

File Added: pkgsrc/net/socat/patches/Attic/patch-ac
$NetBSD: patch-ac,v 1.1 2008/01/27 12:35:17 rillig Exp $

As the author said: Keep the enums and their names in sync.

--- xioopts.h.orig	2007-03-06 22:19:46.000000000 +0100
+++ xioopts.h	2008-01-27 13:32:15.000000000 +0100
@@ -49,7 +49,9 @@ enum e_types {
    TYPE_LONGLONG,	/* long long */
    TYPE_OFF32,		/* off_t */
    TYPE_OFF64,		/* off64_t */
+#if HAVE_STRUCT_IP_MREQ || HAVE_STRUCT_IP_MREQN
    TYPE_IP_MREQN,	/* for  struct ip_mreq  or  struct ip_mreqn */
+#endif
    TYPE_IP4NAME,	/* IPv4 hostname or address */
 
    TYPE_2BYTE = TYPE_USHORT