$NetBSD: patch-am,v 1.11 2003/11/27 00:03:53 taya Exp $ diff -ru ../Orig/mozilla/nsprpub/pr/src/pthreads/ptio.c ./nsprpub/pr/src/pthreads/ptio.c --- ../Orig/mozilla/nsprpub/pr/src/pthreads/ptio.c 2003-07-15 06:59:47.000000000 +0900 +++ ./nsprpub/pr/src/pthreads/ptio.c 2003-10-16 15:37:22.000000000 +0900 @@ -189,7 +189,7 @@ #endif #endif -#ifdef DARWIN +#if defined(DARWIN) || (defined(__NetBSD__) && defined(IPV6_V6ONLY)) static PRBool _pr_ipv6_v6only_on_by_default; /* The IPV6_V6ONLY socket option is not defined on Mac OS X 10.1. */ #ifndef IPV6_V6ONLY @@ -202,7 +202,7 @@ #elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(HPUX) \ || defined(LINUX) || defined(FREEBSD) || defined(BSDI) || defined(VMS) \ || defined(NTO) || defined(OPENBSD) || defined(DARWIN) \ - || defined(UNIXWARE) + || defined(UNIXWARE) || defined(NETBSD) #define _PRSockOptVal_t void * #else #error "Cannot determine architecture" @@ -1154,7 +1154,7 @@ _pr_stderr = pt_SetMethods(2, PR_DESC_FILE, PR_FALSE, PR_TRUE); PR_ASSERT(_pr_stdin && _pr_stdout && _pr_stderr); -#ifdef DARWIN +#if defined(DARWIN) || (defined(__NetBSD__) && defined(IPV6_V6ONLY)) /* In Mac OS X v10.3 Panther Beta the IPV6_V6ONLY socket option * is turned on by default, contrary to what RFC 3493, Section * 5.3 says. So we have to turn it off. Find out whether we @@ -3462,7 +3462,7 @@ if (osfd == -1) pt_MapError(_PR_MD_MAP_SOCKET_ERROR, errno); else { -#ifdef DARWIN +#if defined(DARWIN) || (defined(__NetBSD__) && defined(IPV6_V6ONLY)) if ((domain == AF_INET6) && _pr_ipv6_v6only_on_by_default) { int on = 0;