mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-03 19:02:35 +00:00
iOS doesn't have crt_externs.h available, so we fall back to the posix method.
llvm-svn: 227521
This commit is contained in:
parent
824e762e33
commit
32a0ce800a
@ -42,7 +42,10 @@
|
||||
#define _RESTRICT_KYWD
|
||||
#endif
|
||||
#include <spawn.h>
|
||||
#if !defined(__APPLE__)
|
||||
#if defined(__APPLE__)
|
||||
#include <TargetConditionals.h>
|
||||
#endif
|
||||
#if !defined(__APPLE__) || defined(TARGET_OS_IPHONE)
|
||||
extern char **environ;
|
||||
#else
|
||||
#include <crt_externs.h> // _NSGetEnviron
|
||||
@ -217,7 +220,7 @@ static bool Execute(ProcessInfo &PI, StringRef Program, const char **args,
|
||||
}
|
||||
|
||||
if (!envp)
|
||||
#if !defined(__APPLE__)
|
||||
#if !defined(__APPLE__) || defined(TARGET_OS_IPHONE)
|
||||
envp = const_cast<const char **>(environ);
|
||||
#else
|
||||
// environ is missing in dylibs.
|
||||
|
Loading…
x
Reference in New Issue
Block a user