$NetBSD: patch-ac,v 1.2 2011/01/31 08:42:10 adam Exp $ --- src/PerfSocket.cpp.orig 2005-10-07 13:34:29.000000000 +1300 +++ src/PerfSocket.cpp @@ -110,8 +110,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" ); }