From 29797b9eb0ca06e4ca46ed9172edb35348bf8001 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Tue, 27 Apr 2021 11:54:24 +0100 Subject: [PATCH] Use _NSGetEnviron() on Apple --- src/core/os.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/os.c b/src/core/os.c index 64cc1b34..96b0b16c 100644 --- a/src/core/os.c +++ b/src/core/os.c @@ -56,7 +56,12 @@ #include #include #include +#ifdef JANET_APPLE +#include +#define environ (*_NSGetEnviron()) +#else extern char **environ; +#endif #ifdef JANET_THREADS #include #endif