Files
pkgsrc-ng/net/udpcast/patches/patch-ab
T
2013-09-26 17:14:40 +02:00

26 lines
629 B
Plaintext

$NetBSD: patch-ab,v 1.2 2006/08/28 15:07:48 drochner Exp $
--- socklib.c.orig 2006-05-24 00:19:49.000000000 +0200
+++ socklib.c
@@ -879,6 +879,9 @@ int makeSocket(addr_type_t addr_type,
int ret, s;
struct sockaddr_in myaddr;
in_addr_t ip=0;
+#ifdef SO_REUSEPORT
+ int one = 1;
+#endif
#ifdef WINDOWS
static int lastSocket=-1;
@@ -897,6 +900,10 @@ int makeSocket(addr_type_t addr_type,
exit(1);
}
+#ifdef SO_REUSEPORT
+ ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one));
+#endif
+
if(addr_type == ADDR_TYPE_MCAST && tmpl != NULL) {
ip = tmpl->sin_addr.s_addr;
}