summaryrefslogtreecommitdiff
path: root/net/howl/patches/patch-aa
blob: 5764134d3ec04fed25d24b0bd40ae11ed1b44995 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$NetBSD: patch-aa,v 1.3 2005/01/08 06:24:41 schmonz Exp $

--- src/lib/howl/socket.c.orig	2004-10-27 13:39:52.000000000 -0400
+++ src/lib/howl/socket.c
@@ -261,7 +261,7 @@ sw_multicast_socket_super_init(
 	err = sw_translate_error(self->m_desc != SW_INVALID_SOCKET, sw_socket_errno());
 	sw_check_okay_log(err, exit);
 
-#if defined(__APPLE__) || defined(__VXWORKS__) || defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__VXWORKS__) || defined(__FreeBSD__) || defined(__NetBSD__)
    res = setsockopt(self->m_desc, SOL_SOCKET, SO_REUSEPORT, (char*) &opt, sizeof(opt));
 #else
 	res = setsockopt(self->m_desc, SOL_SOCKET, SO_REUSEADDR, (char*) &opt, sizeof(opt));
@@ -375,6 +375,7 @@ sw_socket_join_multicast_group(
 #endif
 	int							res;
 	sw_result					err;
+ 	sw_uchar						mttl					= (sw_uchar) ttl;
 
    /*
       initialize the group membership
@@ -425,7 +426,7 @@ sw_socket_join_multicast_group(
 	err = sw_translate_error(res == 0, sw_socket_errno());
 	sw_check_okay_log(err, exit);
 
-	res = setsockopt(self->m_desc, IPPROTO_IP, IP_MULTICAST_TTL, (char*) &real_ttl, sizeof(real_ttl));
+	res = setsockopt(self->m_desc, IPPROTO_IP, IP_MULTICAST_TTL, (char*) &mttl, sizeof(mttl));
 	err = sw_translate_error(res == 0, sw_socket_errno());
 	sw_check_okay_log(err, exit);