Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: fix build on iOS
Browse files Browse the repository at this point in the history
_NSGetEnviron() doesn't exist on iOS, use plain `extern char **environ` instead.
  • Loading branch information
bnoordhuis committed Feb 25, 2012
1 parent ea9baef commit 57c5fa1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/unix/process.c
Expand Up @@ -32,6 +32,10 @@
#include <stdio.h>

#ifdef __APPLE__
# include <TargetConditionals.h>
#endif

#if defined(__APPLE__) && !defined(TARGET_OS_IPHONE)
# include <crt_externs.h>
# define environ (*_NSGetEnviron())
#else
Expand Down

0 comments on commit 57c5fa1

Please sign in to comment.