diff --git a/ChangeLog b/ChangeLog index 0c7f654e9e..b03275190e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Jun 20 16:36:14 2012 Nobuyoshi Nakada + + * missing/setproctitle.c (environ): use (*_NSGetEnviron()) instead of + environ on Darwin for namespace cleanness, same as [ruby-core:00537]. + [ruby-core:45615] [Bug #6576] + Wed Jun 20 11:33:04 2012 Nobuyoshi Nakada * process.c (rb_execarg_addopt): always make Fixnum, and ignore higher 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 +#if defined(__APPLE__) +#include +#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 */