$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