--- sal/osl/unx/socket.c.orig Thu Aug 31 00:14:12 2006 +++ sal/osl/unx/socket.c Thu Aug 31 00:15:33 2006 @@ -836,7 +836,7 @@ const char *name, struct hostent *result, char *buffer, int buflen, int *h_errnop) { -#ifdef LINUX +#if defined(LINUX) || (defined(FREEBSD) && (__FreeBSD_version >= 601103)) struct hostent *__result; /* will be the same as result */ int __error; __error = gethostbyname_r (name, result, buffer, buflen, --- sal/osl/unx/system.c.orig Thu Aug 31 00:15:46 2006 +++ sal/osl/unx/system.c Thu Aug 31 00:16:31 2006 @@ -369,6 +369,8 @@ } #endif /* defined SCO */ +#if !defined(FREEBSD) || (__FreeBSD_version < 601103) + extern int h_errno; struct hostent *gethostbyname_r(const char *name, struct hostent *result, @@ -459,6 +461,8 @@ return res; } + +#endif #if defined(MACOSX) /* --- sal/osl/unx/system.h.orig Thu Aug 31 00:16:53 2006 +++ sal/osl/unx/system.h Thu Aug 31 00:18:40 2006 @@ -576,8 +576,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 < 601103) struct hostent *gethostbyname_r(const char *name, struct hostent *result, char *buffer, int buflen, int *h_errnop); +#endif /* !defined(FREEBSD) || (__FreeBSD_version < 601103) */ #endif #endif /* __OSL_SYSTEM_H__ */