$NetBSD: patch-be,v 1.12 2003/11/27 00:03:53 taya Exp $ diff -ru ../Orig/mozilla/nsprpub/pr/src/io/prsocket.c ./nsprpub/pr/src/io/prsocket.c --- ../Orig/mozilla/nsprpub/pr/src/io/prsocket.c 2002-06-12 05:08:07.000000000 +0900 +++ ./nsprpub/pr/src/io/prsocket.c 2003-10-16 15:37:39.000000000 +0900 @@ -1299,6 +1299,15 @@ if (osfd == -1) { return 0; } +#if defined(__NetBSD__) && defined(_PR_INET6) && defined(IPV6_V6ONLY) + if(domain == PR_AF_INET6){ + int opt = 0; + if(setsockopt(osfd, IPPROTO_IPV6, IPV6_V6ONLY, &opt, sizeof(opt))){ + close(osfd); + return -1; + } + } +#endif if (type == SOCK_STREAM) fd = PR_AllocFileDesc(osfd, PR_GetTCPMethods()); else