on macos systems where we can't get the environment,
just return from ktc_newpag
Change-Id: I9a169d0bf035c40d727a386bb3d2070eea225ed4
Reviewed-on: http://gerrit.openafs.org/2150
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
MKAFS_OSTYPE=DUX
AC_MSG_RESULT(alpha_dux)
;;
+ arm-*-darwin*)
+ MKAFS_OSTYPE=DARWIN
+ AC_MSG_RESULT(arm_darwin)
+ ;;
powerpc-*-darwin*)
MKAFS_OSTYPE=DARWIN
AC_MSG_RESULT(ppc_darwin)
case $AFS_SYSNAME in
*_darwin*)
+ AC_CHECK_HEADERS(crt_externs.h)
DARWIN_PLIST=src/libafs/afs.${AFS_SYSNAME}.plist
DARWIN_INFOFILE=afs.${AFS_SYSNAME}.plist
;;
#endif
#endif
#endif
-#ifdef AFS_DARWIN100_ENV
+#ifdef HAVE_CRT_EXTERNS_H
#include <crt_externs.h>
#endif
#ifdef HAVE_UNISTD_H
int
ktc_newpag(void)
{
-#ifdef AFS_DARWIN100_ENV
-#define environ (*_NSGetEnviron())
-#else
+#if !defined(AFS_DARWIN100_ENV) || defined(HAVE_CRT_EXTERNS_H)
+# if defined(AFS_DARWIN100_ENV)
+# define environ (*_NSGetEnviron())
+# else
extern char **environ;
-#endif
+# endif
afs_uint32 pag;
struct stat sbuf;
*++denv = 0;
environ = newenv;
UNLOCK_GLOBAL_MUTEX;
+#endif
return 0;
}