diff options
Diffstat (limited to 'xs/src/libslic3r/PlaceholderParser.cpp')
-rw-r--r-- | xs/src/libslic3r/PlaceholderParser.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xs/src/libslic3r/PlaceholderParser.cpp b/xs/src/libslic3r/PlaceholderParser.cpp index 03aeee37e..cddfa21fa 100644 --- a/xs/src/libslic3r/PlaceholderParser.cpp +++ b/xs/src/libslic3r/PlaceholderParser.cpp @@ -5,7 +5,13 @@ #include <sstream> #include <unistd.h> // provides **environ -extern char **environ; +#ifdef __APPLE__ +#include <crt_externs.h> +#undef environ +#define environ (*_NSGetEnviron()) +#else + extern char **environ; +#endif namespace Slic3r { |