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.
25 lines
935 B
Text
25 lines
935 B
Text
$NetBSD: patch-ab,v 1.1 2005/10/07 20:29:52 markd Exp $
|
|
|
|
--- src/Listener.cpp.orig 2005-05-03 08:09:27.000000000 +1200
|
|
+++ src/Listener.cpp
|
|
@@ -369,6 +369,9 @@ void Listener::McastJoin( ) {
|
|
WARN_errno( rc == SOCKET_ERROR, "multicast join" );
|
|
}
|
|
#ifdef HAVE_IPV6_MULTICAST
|
|
+#if !defined(IPV6_ADD_MEMBERSHIP) && defined(IPV6_JOIN_GROUP)
|
|
+#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
|
|
+#endif
|
|
else {
|
|
struct ipv6_mreq mreq;
|
|
|
|
@@ -393,8 +396,9 @@ void Listener::McastJoin( ) {
|
|
void Listener::McastSetTTL( int val ) {
|
|
#ifdef HAVE_MULTICAST
|
|
if ( !SockAddr_isIPv6( &mSettings->local ) ) {
|
|
+ u_char uval = val;
|
|
int rc = setsockopt( mSettings->mSock, IPPROTO_IP, IP_MULTICAST_TTL,
|
|
- (char*) &val, sizeof(val));
|
|
+ (char*) &uval, sizeof(uval));
|
|
WARN_errno( rc == SOCKET_ERROR, "multicast ttl" );
|
|
}
|
|
#ifdef HAVE_IPV6_MULTICAST
|