Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > ac5c8fc96e548c966b624bd7fe72cc65 > files > 14

netcat-openbsd-1.89-3mdv2009.1.src.rpm

Index: netcat-openbsd-1.89/netcat.c
===================================================================
--- netcat-openbsd-1.89.orig/netcat.c	2008-01-22 16:17:25.000000000 -0500
+++ netcat-openbsd-1.89/netcat.c	2008-01-22 16:17:27.000000000 -0500
@@ -554,6 +554,10 @@
 		if ((s = socket(res0->ai_family, res0->ai_socktype,
 		    res0->ai_protocol)) < 0)
 			continue;
+
+		ret = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &x, sizeof(x));
+		if (ret == -1)
+			err(1, NULL);
 		#ifdef SO_REUSEPORT
 		ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x));
 		if (ret == -1)