--- sal/osl/unx/socket.c.orig Thu Sep 8 11:01:17 2005 +++ sal/osl/unx/socket.c Fri May 5 19:14:17 2006 @@ -813,7 +813,7 @@ const char *name, struct hostent *result, char *buffer, int buflen, int *h_errnop) { -#ifdef LINUX +#if defined(LINUX) || (defined(FREEBSD) && (__FreeBSD_version >= 700015)) struct hostent *__result; /* will be the same as result */ int __error; __error = gethostbyname_r (name, result, buffer, buflen, --- sal/osl/unx/system.c.orig Fri Apr 7 04:06:25 2006 +++ sal/osl/unx/system.c Fri May 5 19:18:51 2006 @@ -343,6 +343,8 @@ } #endif /* defined SCO */ +#if !defined(FREEBSD) || (__FreeBSD_version < 700015) + extern int h_errno; struct hostent *gethostbyname_r(const char *name, struct hostent *result, @@ -433,6 +435,7 @@ return res; } +#endif /* !defined(FREEBSD) || (__FreeBSD_version < 700015) */ #if defined(MACOSX) /* --- sal/osl/unx/system.h.orig Thu May 4 04:48:25 2006 +++ sal/osl/unx/system.h Wed May 24 16:06:13 2006 @@ -543,8 +543,10 @@ struct tm *localtime_r(const time_t *timep, struct tm *buffer); struct tm *gmtime_r(const time_t *timep, struct tm *buffer); #endif /* !defined FREEBSD || (__FreeBSD_version < 500112) */ +#if !defined(FREEBSD) || (__FreeBSD_version < 700015) struct hostent *gethostbyname_r(const char *name, struct hostent *result, char *buffer, int buflen, int *h_errnop); +#endif /* !defined(FREEBSD) || (__FreeBSD_version < 700015) */ #endif #endif /* __OSL_SYSTEM_H__ */ --- moz/mozilla-source-1.7.5.patch.orig Wed Jun 21 23:50:14 2006 +++ moz/mozilla-source-1.7.5.patch Thu Jun 22 00:00:08 2006 @@ -7697,3 +7697,15 @@ # Force applications to be built non-statically # when building the mozcomps meta component +--- misc/build/mozilla/nsprpub/pr/src/misc/prnetdb.c.orig Thu Sep 2 08:44:37 2004 ++++ misc/build/mozilla/nsprpub/pr/src/misc/prnetdb.c Wed Jun 21 23:58:12 2006 +@@ -105,7 +105,8 @@ + #define _PR_HAVE_GETPROTO_R_INT + #endif + +-#if (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2) ++#if (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2) || \ ++ (defined(__FreeBSD__) && __FreeBSD_version > 700016) + #define _PR_HAVE_GETPROTO_R + #define _PR_HAVE_5_ARG_GETPROTO_R + #endif