mirror of
https://github.com/samba-team/samba.git
synced 2025-03-24 10:50:22 +03:00
Fix definition of environ on Mac OS X (bugzilla: #5412).
This commit is contained in:
parent
807b862bc9
commit
aafe9ca1aa
@ -222,6 +222,7 @@ AC_CHECK_TYPE(comparison_fn_t,
|
||||
|
||||
AC_HAVE_DECL(setenv, [#include <stdlib.h>])
|
||||
AC_CHECK_FUNCS(setenv unsetenv)
|
||||
AC_HAVE_DECL(environ, [#include <unistd.h>])
|
||||
|
||||
AC_CHECK_FUNCS(strnlen)
|
||||
AC_CHECK_FUNCS(strtoull __strtoull strtouq strtoll __strtoll strtoq)
|
||||
|
@ -182,6 +182,15 @@ char *rep_strndup(const char *s, size_t n);
|
||||
size_t rep_strnlen(const char *s, size_t n);
|
||||
#endif
|
||||
|
||||
#if !HAVE_DECL_ENVIRON
|
||||
#ifdef __APPLE__
|
||||
#include <crt_externs.h>
|
||||
#define environ (*_NSGetEnviron())
|
||||
#else
|
||||
extern char **environ;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SETENV
|
||||
#define setenv rep_setenv
|
||||
int rep_setenv(const char *name, const char *value, int overwrite);
|
||||
|
@ -6210,6 +6210,8 @@ AC_ARG_ENABLE(merged-build,
|
||||
[AS_HELP_STRING([--enable-merged-build], [Build Samba 4 as well])],
|
||||
[ enable_merged_build=$enableval ], [ enable_merged_build=auto ])
|
||||
|
||||
m4_include(../lib/zlib/zlib.m4)
|
||||
|
||||
if test x$enable_merged_build = xauto; then
|
||||
merged_build_possible=yes
|
||||
|
||||
@ -6239,7 +6241,6 @@ if test x$enable_merged_build = xyes; then
|
||||
m4_include(samba4.m4)
|
||||
fi
|
||||
|
||||
m4_include(../lib/zlib/zlib.m4)
|
||||
AC_SUBST(ZLIB_LIBS)
|
||||
AC_SUBST(ZLIB_OBJS)
|
||||
AC_ZLIB([ZLIB_OBJS=""], [
|
||||
|
Loading…
x
Reference in New Issue
Block a user