summaryrefslogtreecommitdiff
path: root/www/firefox/patches/patch-be
blob: 70a3be65ed21775718268edc9ee545ac2def666d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$NetBSD: patch-be,v 1.1.1.1 2004/02/29 17:45:02 xtraeme 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-20 10:19:05.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