diff options
| author | bors <bors@rust-lang.org> | 2013-11-06 14:01:14 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-11-06 14:01:14 -0800 |
| commit | 22eb11c09ba8939ab06351eb5d14b355f632e197 (patch) | |
| tree | e823b8b63030586cf3cc254aba383a61aa4c154f /src/rt/rust_builtin.cpp | |
| parent | fdc830df31df205c8edc5e11268a011d44c8bc09 (diff) | |
| parent | 2a333ed0884c65d06591607e6e9b2857bd327d6e (diff) | |
| download | rust-22eb11c09ba8939ab06351eb5d14b355f632e197.tar.gz rust-22eb11c09ba8939ab06351eb5d14b355f632e197.zip | |
auto merge of #10227 : kud1ing/rust/ios, r=alexcrichton
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 486c95a548d..e8141d37ff1 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -17,8 +17,14 @@ #include <time.h> #ifdef __APPLE__ -#include <crt_externs.h> -#include <mach/mach_time.h> + #include <TargetConditionals.h> + #include <mach/mach_time.h> + + #if (TARGET_OS_IPHONE) + extern char **environ; + #else + #include <crt_externs.h> + #endif #endif #if !defined(__WIN32__) @@ -57,7 +63,7 @@ rust_env_pairs() { #else extern "C" CDECL char** rust_env_pairs() { -#ifdef __APPLE__ +#if defined(__APPLE__) && !(TARGET_OS_IPHONE) char **environ = *_NSGetEnviron(); #endif return environ; |
