Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: nspr/pr/src/pthreads/ptio.c

Issue 170823003: Update to NSS 3.15.5 and NSPR 4.10.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « nspr/pr/src/md/windows/ntmisc.c ('k') | nspr/pr/src/pthreads/ptthread.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nspr/pr/src/pthreads/ptio.c
===================================================================
--- nspr/pr/src/pthreads/ptio.c (revision 251855)
+++ nspr/pr/src/pthreads/ptio.c (working copy)
@@ -3400,8 +3400,6 @@
extern PRBool _pr_ipv6_is_present(void);
PR_IMPLEMENT(PRBool) _pr_test_ipv6_socket()
{
-PRInt32 osfd;
-
#if defined(DARWIN)
/*
* Disable IPv6 if Darwin version is less than 7.0.0 (OS X 10.3). IPv6 on
@@ -3414,18 +3412,24 @@
}
#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)
* suggests that we call open("/dev/ip6", O_RDWR) to determine
* whether IPv6 APIs and the IPv6 stack are on the system.
* 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) {
close(osfd);
return PR_TRUE;
}
return PR_FALSE;
+#endif
}
#endif /* _PR_INET6_PROBE */
#endif
« no previous file with comments | « nspr/pr/src/md/windows/ntmisc.c ('k') | nspr/pr/src/pthreads/ptthread.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698