Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > 676522a1b3eb404ef0e4f22a89ac726e > files > 14

netcat-openbsd-1.89-13.mga9.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)