mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-20 10:30:03 +00:00
iOS doesn't have crt_externs.h available, so we fall back to the posix method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227521 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4c757e0907
commit
39687b93fa
@ -42,7 +42,10 @@
|
|||||||
#define _RESTRICT_KYWD
|
#define _RESTRICT_KYWD
|
||||||
#endif
|
#endif
|
||||||
#include <spawn.h>
|
#include <spawn.h>
|
||||||
#if !defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
|
#include <TargetConditionals.h>
|
||||||
|
#endif
|
||||||
|
#if !defined(__APPLE__) || defined(TARGET_OS_IPHONE)
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
#else
|
#else
|
||||||
#include <crt_externs.h> // _NSGetEnviron
|
#include <crt_externs.h> // _NSGetEnviron
|
||||||
@ -217,7 +220,7 @@ static bool Execute(ProcessInfo &PI, StringRef Program, const char **args,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!envp)
|
if (!envp)
|
||||||
#if !defined(__APPLE__)
|
#if !defined(__APPLE__) || defined(TARGET_OS_IPHONE)
|
||||||
envp = const_cast<const char **>(environ);
|
envp = const_cast<const char **>(environ);
|
||||||
#else
|
#else
|
||||||
// environ is missing in dylibs.
|
// environ is missing in dylibs.
|
||||||
|
Loading…
Reference in New Issue
Block a user