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

Unified Diff: nss/mozilla/nsprpub/pr/src/misc/prnetdb.c

Issue 3135002: Update to NSS 3.12.7 and NSPR 4.8.6.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years, 4 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
Index: nss/mozilla/nsprpub/pr/src/misc/prnetdb.c
===================================================================
--- nss/mozilla/nsprpub/pr/src/misc/prnetdb.c (revision 55475)
+++ nss/mozilla/nsprpub/pr/src/misc/prnetdb.c (working copy)
@@ -95,7 +95,8 @@
#if defined(SOLARIS) || (defined(BSDI) && defined(_REENTRANT)) \
|| (defined(LINUX) && defined(_REENTRANT) \
- && !(defined(__GLIBC__) && __GLIBC__ >= 2))
+ && !(defined(__GLIBC__) && __GLIBC__ >= 2)) \
+ && !defined(ANDROID)
#define _PR_HAVE_GETPROTO_R
#define _PR_HAVE_GETPROTO_R_POINTER
#endif
@@ -1185,6 +1186,16 @@
* any usable implementation.
*/
+#if defined(ANDROID)
+/* Android's Bionic libc system includes prototypes for these in netdb.h,
+ * but doesn't actually include implementations. It uses the 5-arg form,
+ * so these functions end up not matching the prototype. So just rename
+ * them if not found.
+ */
+#define getprotobyname_r _pr_getprotobyname_r
+#define getprotobynumber_r _pr_getprotobynumber_r
+#endif
+
static struct protoent *getprotobyname_r(const char* name)
{
return getprotobyname(name);

Powered by Google App Engine
This is Rietveld 408576698