Bug 936320: Update NSPR to NSPR_4_10_3_BETA3. r=gdestuynder.

This commit is contained in:
Wan-Teh Chang 2014-01-24 08:33:02 -08:00
parent aea63ad964
commit 3035695bee
3 changed files with 8 additions and 5 deletions

View File

@ -1 +1 @@
NSPR_4_10_3_BETA2 NSPR_4_10_3_BETA3

View File

@ -10,4 +10,3 @@
*/ */
#error "Do not include this header file." #error "Do not include this header file."

View File

@ -3400,8 +3400,6 @@ PR_EXTERN(PRStatus) _pr_push_ipv6toipv4_layer(PRFileDesc *fd);
extern PRBool _pr_ipv6_is_present(void); extern PRBool _pr_ipv6_is_present(void);
PR_IMPLEMENT(PRBool) _pr_test_ipv6_socket() PR_IMPLEMENT(PRBool) _pr_test_ipv6_socket()
{ {
PRInt32 osfd;
#if defined(DARWIN) #if defined(DARWIN)
/* /*
* Disable IPv6 if Darwin version is less than 7.0.0 (OS X 10.3). IPv6 on * Disable IPv6 if Darwin version is less than 7.0.0 (OS X 10.3). IPv6 on
@ -3414,18 +3412,24 @@ PRInt32 osfd;
} }
#endif #endif
#if defined(LINUX)
/* If /proc/net/if_inet6 exists, the Linux kernel supports IPv6. */
int rv = access("/proc/net/if_inet6", F_OK);
return (rv == 0);
#else
/* /*
* HP-UX only: HP-UX IPv6 Porting Guide (dated February 2001) * HP-UX only: HP-UX IPv6 Porting Guide (dated February 2001)
* suggests that we call open("/dev/ip6", O_RDWR) to determine * suggests that we call open("/dev/ip6", O_RDWR) to determine
* whether IPv6 APIs and the IPv6 stack are on the system. * whether IPv6 APIs and the IPv6 stack are on the system.
* Our portable test below seems to work fine, so I am using it. * Our portable test below seems to work fine, so I am using it.
*/ */
osfd = socket(AF_INET6, SOCK_STREAM, 0); PRInt32 osfd = socket(AF_INET6, SOCK_STREAM, 0);
if (osfd != -1) { if (osfd != -1) {
close(osfd); close(osfd);
return PR_TRUE; return PR_TRUE;
} }
return PR_FALSE; return PR_FALSE;
#endif
} }
#endif /* _PR_INET6_PROBE */ #endif /* _PR_INET6_PROBE */
#endif #endif