mirror of
https://github.com/janet-lang/janet
synced 2025-02-10 13:50:02 +00:00
Merge pull request #688 from cjones051073/use-nsgetenviron-on-apple
Use _NSGetEnviron() on Apple
This commit is contained in:
commit
ecb49c2e5e
@ -56,7 +56,12 @@
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
#ifdef JANET_APPLE
|
||||||
|
#include <crt_externs.h>
|
||||||
|
#define environ (*_NSGetEnviron())
|
||||||
|
#else
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
#endif
|
||||||
#ifdef JANET_THREADS
|
#ifdef JANET_THREADS
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user