Bugzilla Bug 354305: allows to build NSPR on FreeBSD 6.2. Support for NSPRPUB_PRE_4_2_CLIENT_BRANCH SUNBIRD_0_3_BASE SUNBIRD_0_3_RELEASE SUNBIRD_0_3rc1_RC1
authorwtchang%redhat.com
Tue, 26 Sep 2006 17:20:40 +0000
branchNSPRPUB_PRE_4_2_CLIENT_BRANCH
changeset 3699 00f1eb3e38f7c877fb5b2b10aa693686da225e9f
parent 3694 73d88fc3c5c551b6ab0339f0a1c7de137062a5cf
child 3700 860cfb892a93e9289bc74baea85d0d957f2dc714
child 3701 50fc4db7a6f20f35495a0d8e021a829c8d469f56
child 3702 feec964c8f98a5df328e97f7a8965c0a105effff
child 3704 18328832d0b12d2a56a2a84032659093e8157b1d
push idunknown
push userunknown
push dateunknown
bugs354305
Bugzilla Bug 354305: allows to build NSPR on FreeBSD 6.2. Support for getprotobyname_r() function is added since 6.2-BETA1, with the same 5-args form of GLIBC 2. Contributed by Diego Pettenò <flameeyes@gentoo.org>. r=wtc Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
pr/src/misc/prnetdb.c
--- a/pr/src/misc/prnetdb.c
+++ b/pr/src/misc/prnetdb.c
@@ -103,16 +103,21 @@ PRLock *_pr_dnsLock = NULL;
 #if defined(OSF1) \
         || defined(AIX4_3_PLUS) || (defined(AIX) && defined(_THREAD_SAFE)) \
 	|| (defined(HPUX10_10) && defined(_REENTRANT)) \
         || (defined(HPUX10_20) && defined(_REENTRANT))
 #define _PR_HAVE_GETPROTO_R
 #define _PR_HAVE_GETPROTO_R_INT
 #endif
 
+#if __FreeBSD_version >= 602000
+#define _PR_HAVE_GETPROTO_R
+#define _PR_HAVE_5_ARG_GETPROTO_R
+#endif
+
 /* BeOS has glibc but not the glibc-style getprotobyxxx_r functions. */
 #if (defined(__GLIBC__) && __GLIBC__ >= 2 && !defined(XP_BEOS))
 #define _PR_HAVE_GETPROTO_R
 #define _PR_HAVE_5_ARG_GETPROTO_R
 #endif
 
 #if !defined(_PR_HAVE_GETPROTO_R)
 PRLock* _getproto_lock = NULL;