aboutsummaryrefslogtreecommitdiff
path: root/src/os.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-02-23 01:38:03 -0500
committerGitHub <noreply@github.com>2020-02-23 01:38:03 -0500
commitd1243bf272b591a8deba5abedb56050edf3c3d6a (patch)
treea9ca11c601631de614c0fdca478f730a2cc4dc01 /src/os.cpp
parent0cd89e9176ab36fc5e267120dc4d75cb79d32684 (diff)
parent94c3dbf9e3f9fcc63b2495adec36e6b4acb1813e (diff)
downloadzig-d1243bf272b591a8deba5abedb56050edf3c3d6a.tar.gz
zig-d1243bf272b591a8deba5abedb56050edf3c3d6a.zip
Merge pull request #4525 from ziglang/environ
update std lib to integrate with libc for environ
Diffstat (limited to 'src/os.cpp')
-rw-r--r--src/os.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/os.cpp b/src/os.cpp
index 268e812050..8e0bcc433b 100644
--- a/src/os.cpp
+++ b/src/os.cpp
@@ -81,11 +81,7 @@ static clock_serv_t macos_monotonic_clock;
#include <errno.h>
#include <time.h>
-// Apple doesn't provide the environ global variable
-#if defined(__APPLE__) && !defined(environ)
-#include <crt_externs.h>
-#define environ (*_NSGetEnviron())
-#elif defined(ZIG_OS_FREEBSD) || defined(ZIG_OS_NETBSD) || defined(ZIG_OS_DRAGONFLY)
+#if !defined(environ)
extern char **environ;
#endif