1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 19:19:53 +00:00

Use _NSGetEnviron() on Apple

This commit is contained in:
Chris Jones 2021-04-27 11:54:24 +01:00
parent e181ee586b
commit 29797b9eb0
No known key found for this signature in database
GPG Key ID: 80CE1DC78DAB03DE

View File

@ -56,7 +56,12 @@
#include <dirent.h>
#include <sys/types.h>
#include <sys/wait.h>
#ifdef JANET_APPLE
#include <crt_externs.h>
#define environ (*_NSGetEnviron())
#else
extern char **environ;
#endif
#ifdef JANET_THREADS
#include <pthread.h>
#endif