diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2016-04-11 13:04:54 +0300 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2016-04-11 13:04:54 +0300 |
commit | f66585c250edf077739bedf00820dbb7ba465efd (patch) | |
tree | 824cf57e2e833cc3c54e53dc8b03227f028454d2 /xs/src | |
parent | 82b07a02fa97d5398a50b59257c14a221c4f76cb (diff) |
Fixed compilation on OS X
Diffstat (limited to 'xs/src')
-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 { |