diff options
Diffstat (limited to 'lib/replace/replace.h')
-rw-r--r-- | lib/replace/replace.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/replace/replace.h b/lib/replace/replace.h index af1208a8fc..a8164b642b 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -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); |