summaryrefslogtreecommitdiffstats
path: root/base/process_util_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'base/process_util_mac.mm')
-rw-r--r--base/process_util_mac.mm7
1 files changed, 2 insertions, 5 deletions
diff --git a/base/process_util_mac.mm b/base/process_util_mac.mm
index a52f608..6dd865b 100644
--- a/base/process_util_mac.mm
+++ b/base/process_util_mac.mm
@@ -7,15 +7,12 @@
#include "base/process_util.h"
#import <Cocoa/Cocoa.h>
+#include <crt_externs.h>
#include <spawn.h>
#include <string>
#include <sys/types.h>
#include <sys/wait.h>
-extern "C" {
-extern char** environ;
-}
-
namespace base {
bool LaunchApp(const std::vector<std::string>& argv,
@@ -65,7 +62,7 @@ bool LaunchApp(const std::vector<std::string>& argv,
&file_actions,
NULL,
argv_copy,
- environ) == 0);
+ *_NSGetEnviron()) == 0);
posix_spawn_file_actions_destroy(&file_actions);