mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
stage1 os: workaround for macos not having environ variable
This commit is contained in:
parent
e29a3b1d2a
commit
05e608a0c7
@ -71,6 +71,12 @@ static clock_serv_t cclock;
|
||||
#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())
|
||||
#endif
|
||||
|
||||
#if defined(ZIG_OS_POSIX)
|
||||
static void populate_termination(Termination *term, int status) {
|
||||
if (WIFEXITED(status)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user