diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-20 07:36:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-20 07:36:23 +0000 |
commit | 2741a598ff9e561c71eb39a57bb19c0a3205eaef (patch) | |
tree | 7bc32c7605c871619974582d429af81e5939410e /missing | |
parent | 50aab6d401b1dc1416558c08190068bb43f7c673 (diff) | |
download | bundler-2741a598ff9e561c71eb39a57bb19c0a3205eaef.tar.gz |
setproctitle.c: _NSGetEnviron
* missing/setproctitle.c (environ): use (*_NSGetEnviron()) instead of
environ on Darwin for namespace cleanness, same as [ruby-core:00537].
[ruby-core:45615] [Bug #6576]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing')
-rw-r--r-- | missing/setproctitle.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/missing/setproctitle.c b/missing/setproctitle.c index 169ba8bcd2..d35e70d534 100644 --- a/missing/setproctitle.c +++ b/missing/setproctitle.c @@ -48,6 +48,12 @@ #endif #include <string.h> +#if defined(__APPLE__) +#include <crt_externs.h> +#undef environ +#define environ (*_NSGetEnviron()) +#endif + #define SPT_NONE 0 /* don't use it at all */ #define SPT_PSTAT 1 /* use pstat(PSTAT_SETCMD, ...) */ #define SPT_REUSEARGV 2 /* cover argv with title information */ |