Index: missing/setproctitle.c =================================================================== --- missing/setproctitle.c (revision 35272) +++ missing/setproctitle.c (working copy) @@ -36,6 +36,10 @@ #include "ruby/util.h" #define compat_init_setproctitle ruby_init_setproctitle +#ifdef __APPLE__ +#include +#endif + #ifndef HAVE_SETPROCTITLE #include @@ -72,7 +76,13 @@ compat_init_setproctitle(int argc, char *argv[]) { #if defined(SPT_TYPE) && SPT_TYPE == SPT_REUSEARGV + +#ifdef __APPLE__ +#undef environ +#define environ (*_NSGetEnviron()) +#else extern char **environ; +#endif char *lastargv = NULL; char *lastenvp = NULL; char **envp = environ;