summaryrefslogtreecommitdiff
path: root/www/phoenix/patches/patch-am
blob: 76adc07e5c9bd5790f38ec34ae00ae0419b3bfe3 (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
$NetBSD: patch-am,v 1.3 2003/01/20 23:38:09 taya Exp $

--- nsprpub/pr/src/pthreads/ptio.c.orig	Sun Jan 19 18:55:37 2003
+++ nsprpub/pr/src/pthreads/ptio.c	Sun Jan 19 18:57:31 2003
@@ -192,7 +192,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"
@@ -3426,6 +3426,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);
     }