Chromium Code Reviews| Index: runtime/bin/platform_macos.cc |
| diff --git a/runtime/bin/platform_macos.cc b/runtime/bin/platform_macos.cc |
| index 351a829db717d47f0f0159d62b39fc06ddba3635..6e006c08a7c3f760488f9b9650d2dfc19bc2acf1 100644 |
| --- a/runtime/bin/platform_macos.cc |
| +++ b/runtime/bin/platform_macos.cc |
| @@ -3,14 +3,16 @@ |
| // BSD-style license that can be found in the LICENSE file. |
| #include "platform/globals.h" |
| -#if defined(TARGET_OS_MACOS) |
| +#if defined(TARGET_OS_MACOS) || defined(TARGET_OS_IOS) |
|
Ivan Posva
2015/06/09 21:20:03
Please note that TARGET_OS_IOS also automatically
|
| #include <mach-o/dyld.h> |
| #include "bin/file.h" |
| #include "bin/platform.h" |
| +#if !defined(TARGET_OS_IOS) |
| #include <crt_externs.h> // NOLINT |
| +#endif |
| #include <signal.h> // NOLINT |
| #include <string.h> // NOLINT |
| #include <unistd.h> // NOLINT |
| @@ -57,6 +59,9 @@ bool Platform::LocalHostname(char *buffer, intptr_t buffer_length) { |
| char** Platform::Environment(intptr_t* count) { |
| +#if defined(TARGET_OS_IOS) |
| + return NULL; |
|
Ivan Posva
2015/06/09 21:20:03
Is there really no way to access environment varia
|
| +#else |
| // Using environ directly is only safe as long as we do not |
| // provide access to modifying environment variables. |
| // On MacOS you have to do a bit of magic to get to the |
| @@ -71,6 +76,7 @@ char** Platform::Environment(intptr_t* count) { |
| result[current] = environ[current]; |
| } |
| return result; |
| +#endif |
| } |