diff --git a/configure.ac b/configure.ac index 85d65ff..d8a8ee2 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,9 @@ case "${target_os}" in ELK_LDFLAGS="${ELK_LDFLAGS} -no-undefined" MATH_LIBS="" ;; + *darwin*) + AC_DEFINE(SYS_DARWIN, 1, Define if the system is Darwin)], + ;; esac ELK_LIBS="${ELK_LIBS} ${MATH_LIBS}" diff --git a/lib/unix/process.c b/lib/unix/process.c index 8e9d85c..2af9497 100644 --- a/lib/unix/process.c +++ b/lib/unix/process.c @@ -39,13 +39,13 @@ #ifndef WIN32 -#ifdef ENVIRON_IN_UNISTD_H +#ifndef ENVIRON_IN_UNISTD_H /* "extern" in front of the next declaration causes the Ultrix 4.2 linker * to fail, but omitting it no longer works with modern C compilers: */ extern char **environ; #endif -#ifdef HAVE_ENVIRON +#if defined(HAVE_ENVIRON) && !defined(SYS_DARWIN) static Object P_Environ() { Object ret, cell, str; char *p, **ep;