summaryrefslogtreecommitdiffstats
path: root/base/process_util_mac.mm
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 17:45:28 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 17:45:28 +0000
commit6c1495cfeac8fbe96263db768c2cf7dadea5993d (patch)
tree895e492ec6ef8531d1a60f35a80d9ffcdf31d03e /base/process_util_mac.mm
parent0ba955b4e574625fd58307bca11613a5982ffe34 (diff)
downloadchromium_src-6c1495cfeac8fbe96263db768c2cf7dadea5993d.zip
chromium_src-6c1495cfeac8fbe96263db768c2cf7dadea5993d.tar.gz
chromium_src-6c1495cfeac8fbe96263db768c2cf7dadea5993d.tar.bz2
Use _NSGetEnviron instead of environ (see "man environ"). environ isn't
available in a dylib, and with this change, gyp/xcode is able to build libbase as a dylib. Review URL: http://codereview.chromium.org/21019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9089 0039d316-1c4b-4281-b951-d872f2087c98
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);