From: mquinson Date: Tue, 20 May 2008 22:26:51 +0000 (+0000) Subject: Some extra love is needed to use the environ variable in a dynamic library on darwin X-Git-Tag: v3.3~475 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/12768bb6f056210f01fa6ddc9accb322d7ee7dfd?hp=6006d2b57769822d80bc5259cc3a46928c203b52 Some extra love is needed to use the environ variable in a dynamic library on darwin git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5461 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/gras/Virtu/rl_process.c b/src/gras/Virtu/rl_process.c index 13b37571b3..032abec57d 100644 --- a/src/gras/Virtu/rl_process.c +++ b/src/gras/Virtu/rl_process.c @@ -20,7 +20,12 @@ static xbt_dict_t _process_properties = NULL; static xbt_dict_t _host_properties = NULL; /* the environment, as specified by the opengroup, used to initialize the process properties */ -extern char **environ; +#ifdef DARWIN +# include +# define environ (*_NSGetEnviron()) +#endif + +extern char **environ; void gras_process_init() { char **env_iter;