From: Andreas Schneider Date: Tue, 20 Nov 2018 11:01:32 +0000 (+0100) Subject: lib:replace: Check if HAVE_DECL_ENVIRON is defined first X-Git-Tag: tdb-1.3.17~575 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63a48e64871cbfa36c4f9686a36a951711135114;p=thirdparty%2Fsamba.git lib:replace: Check if HAVE_DECL_ENVIRON is defined first Signed-off-by: Andreas Schneider Reviewed-by: Gary Lockyer --- diff --git a/lib/replace/replace.h b/lib/replace/replace.h index 732a8226858..a6cafc10d66 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -272,6 +272,7 @@ char *rep_strndup(const char *s, size_t n); size_t rep_strnlen(const char *s, size_t n); #endif +#if defined(HAVE_DECL_ENVIRON) #if !HAVE_DECL_ENVIRON #ifdef __APPLE__ #include @@ -280,6 +281,7 @@ size_t rep_strnlen(const char *s, size_t n); extern char **environ; #endif #endif +#endif /* defined(HAVE_DECL_ENVIRON) */ #ifndef HAVE_SETENV #define setenv rep_setenv