diff --git a/src/node.cc b/src/node.cc index 66800bf300..9c6b4babb5 100644 --- a/src/node.cc +++ b/src/node.cc @@ -49,7 +49,12 @@ using namespace v8; +# ifdef __APPLE__ +# include +# define environ (*_NSGetEnviron()) +# else extern char **environ; +# endif namespace node { diff --git a/src/node_child_process.cc b/src/node_child_process.cc index 9201a91307..347ee026a7 100644 --- a/src/node_child_process.cc +++ b/src/node_child_process.cc @@ -13,7 +13,12 @@ #include #endif +# ifdef __APPLE__ +# include +# define environ (*_NSGetEnviron()) +# else extern char **environ; +# endif namespace node {