ac3637a1ae
Fixes configuring of multicast support and ipv6 support on NetBSD. Add patches to deal with: setsockopt(..., IP_MULTICAST_TTL,..) takes a u_char arg (not int). On NetBSD and Solaris (probably other BSD's) ipv6 multicast group join is done with IPV6_JOIN_GROUP not linux's IPV6_ADD_MEMERSHIP.
15 lines
578 B
Text
15 lines
578 B
Text
$NetBSD: patch-ac,v 1.1 2005/10/07 20:29:52 markd Exp $
|
|
|
|
--- src/PerfSocket.cpp.orig 2005-10-07 13:34:29.000000000 +1300
|
|
+++ src/PerfSocket.cpp
|
|
@@ -95,8 +95,9 @@ void SetSocketOptions( thread_Settings *
|
|
int val = inSettings->mTTL;
|
|
#ifdef HAVE_MULTICAST
|
|
if ( !SockAddr_isIPv6( &inSettings->local ) ) {
|
|
+ u_char uval = val;
|
|
int rc = setsockopt( inSettings->mSock, IPPROTO_IP, IP_MULTICAST_TTL,
|
|
- (const void*) &val, (Socklen_t) sizeof(val));
|
|
+ (const void*) &uval, (Socklen_t) sizeof(uval));
|
|
|
|
WARN_errno( rc == SOCKET_ERROR, "multicast ttl" );
|
|
}
|