$NetBSD: patch-ad,v 1.4 2005/01/03 22:51:01 agc Exp $ Patch from Rui-Xiang Guo for building on NetBSD-current --- ../sal/osl/unx/system.c.orig 2003-07-17 01:21:47.000000000 +0800 +++ ../sal/osl/unx/system.c 2004-11-19 10:46:49.000000000 +0800 @@ -97,8 +97,11 @@ struct passwd *getpwnam_r(const char* name, struct passwd* s, char* buffer, int size ) #endif /* BUILD_OS_APPLEOSX */ #else /* MACOSX */ +#if (__NetBSD_Version__ < 299001000) struct passwd *getpwnam_r(const char* name, struct passwd* s, char* buffer, int size ) +#endif #endif /* MACOSX */ +#if (__NetBSD_Version__ < 299001000) { struct passwd* res; @@ -164,8 +167,9 @@ return(res); #endif /* MACOSX */ } +#endif -#if defined(NETBSD) || defined(MACOSX) +#if defined(NETBSD) && (__NetBSD_Version__ < 299001000) || defined(MACOSX) int getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer, size_t buflen, struct passwd **result) { @@ -460,7 +464,7 @@ return res; } -#if defined(MACOSX) +#if defined(MACOSX) || defined(NETBSD) /* * This section works around calls that are missing or broken * in MacOS X 10.1.x and earlier. @@ -504,6 +508,10 @@ return nRet; } +#endif + +#if defined(MACOSX) + /* No reentrant asctime() either... */ /*******************************************************************************/