diff options
author | Andreas Schneider <asn@samba.org> | 2018-11-20 12:01:32 +0100 |
---|---|---|
committer | Gary Lockyer <gary@samba.org> | 2018-11-28 23:19:20 +0100 |
commit | 63a48e64871cbfa36c4f9686a36a951711135114 (patch) | |
tree | 037332435d1efacb019fff1537bdc25d6753ad71 /lib | |
parent | 3be9ffe44565bc58fa7733fcd1b86952d9f7b138 (diff) | |
download | samba-63a48e64871cbfa36c4f9686a36a951711135114.tar.gz |
lib:replace: Check if HAVE_DECL_ENVIRON is defined first
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/replace/replace.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 <crt_externs.h> @@ -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 |