diff --git a/security/coreconf/config.mk b/security/coreconf/config.mk index 47c6caafc3f..8683c71d6c3 100644 --- a/security/coreconf/config.mk +++ b/security/coreconf/config.mk @@ -56,7 +56,7 @@ include $(CORE_DEPTH)/coreconf/command.mk # each OS release. # ####################################################################### -ifeq (,$(filter-out FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX,$(OS_TARGET))) +ifeq (,$(filter-out FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin,$(OS_TARGET))) include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk else include $(CORE_DEPTH)/coreconf/$(OS_CONFIG).mk diff --git a/security/coreconf/nsinstall/nsinstall.c b/security/coreconf/nsinstall/nsinstall.c index cd102634b4f..759a41746d5 100644 --- a/security/coreconf/nsinstall/nsinstall.c +++ b/security/coreconf/nsinstall/nsinstall.c @@ -55,7 +55,7 @@ typedef unsigned int mode_t; #define HAVE_LCHOWN -#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) || defined(VMS) || defined(NTO) +#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) || defined(VMS) || defined(NTO) || defined(DARWIN) #undef HAVE_LCHOWN #endif diff --git a/security/coreconf/nsinstall/pathsub.c b/security/coreconf/nsinstall/pathsub.c index ee1e981cf33..d13c541d05e 100644 --- a/security/coreconf/nsinstall/pathsub.c +++ b/security/coreconf/nsinstall/pathsub.c @@ -35,7 +35,7 @@ ** Pathname subroutines. */ #include -#if defined(FREEBSD) || defined(BSDI) +#if defined(FREEBSD) || defined(BSDI) || defined(DARWIN) #include #endif /* FREEBSD */ #include diff --git a/security/nss/lib/freebl/unix_rand.c b/security/nss/lib/freebl/unix_rand.c index 23118523a8a..21af5fdc6c9 100644 --- a/security/nss/lib/freebl/unix_rand.c +++ b/security/nss/lib/freebl/unix_rand.c @@ -78,7 +78,7 @@ static size_t CopyLowBits(void *dst, size_t dstlen, void *src, size_t srclen) } #if defined(SCO) || defined(UNIXWARE) || defined(BSDI) || defined(FREEBSD) \ - || defined(NETBSD) || defined(NTO) + || defined(NETBSD) || defined(NTO) || defined(DARWIN) #include #define getdtablesize() sysconf(_SC_OPEN_MAX) @@ -718,6 +718,11 @@ safe_pclose(FILE *fp) #if !defined(VMS) + +#ifdef DARWIN +#include +#endif + void RNG_SystemInfoForRNG(void) { FILE *fp; @@ -725,7 +730,11 @@ void RNG_SystemInfoForRNG(void) size_t bytes; const char * const *cp; char *randfile; +#ifdef DARWIN + char **environ = *_NSGetEnviron(); +#else extern char **environ; +#endif static const char * const files[] = { "/etc/passwd", "/etc/utmp", diff --git a/security/nss/lib/ssl/unix_err.c b/security/nss/lib/ssl/unix_err.c index b12d98cb3a4..2f255fbef03 100644 --- a/security/nss/lib/ssl/unix_err.c +++ b/security/nss/lib/ssl/unix_err.c @@ -38,7 +38,7 @@ * may use your version of this file under either the MPL or the * GPL. * - * $Id: unix_err.c,v 1.4 2001-12-04 18:20:57 wtc%netscape.com Exp $ + * $Id: unix_err.c,v 1.5 2002-02-10 05:24:49 wtc%netscape.com Exp $ */ #if 0 @@ -48,7 +48,7 @@ #include "prerror.h" #endif -#if defined (__bsdi__) || defined(NTO) +#if defined (__bsdi__) || defined(NTO) || defined(DARWIN) #undef _PR_POLL_AVAILABLE #endif