auto merge of #10227 : kud1ing/rust/ios, r=alexcrichton
This commit is contained in:
commit
22eb11c09b
5 changed files with 26 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue