blob: 48d39fb60b9795f7929eb49bb4d51730a241a361 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
$NetBSD: patch-am,v 1.10 2003/03/17 16:07:35 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-01-21 05:50:00.000000000 +0900
+++ ./nsprpub/pr/src/pthreads/ptio.c 2003-03-14 16:58:52.000000000 +0900
@@ -194,7 +194,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"
@@ -3428,6 +3428,15 @@
if (osfd == -1) pt_MapError(_PR_MD_MAP_SOCKET_ERROR, errno);
else
{
+#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 NULL;
+ }
+ }
+#endif
fd = pt_SetMethods(osfd, ftype, PR_FALSE, PR_FALSE);
if (fd == NULL) close(osfd);
}
|