From 197a3bb2100bd6f6894aed79674324ef8e791aa8 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 22 Jul 2009 07:10:11 +0000 Subject: [PATCH] FreeBSD stuff --- dtool/src/dtoolutil/executionEnvironment.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dtool/src/dtoolutil/executionEnvironment.cxx b/dtool/src/dtoolutil/executionEnvironment.cxx index c2e5594f06..8236e68276 100644 --- a/dtool/src/dtoolutil/executionEnvironment.cxx +++ b/dtool/src/dtoolutil/executionEnvironment.cxx @@ -35,6 +35,10 @@ #define environ (*_NSGetEnviron()) #endif +#ifdef IS_FREEBSD +extern char **environ; +#endif + #ifdef HAVE_PYTHON #include "Python.h" #endif @@ -408,8 +412,9 @@ read_environment_variables() { } ch = proc.get(); } -#elif defined(IS_OSX) +#elif defined(IS_OSX) || defined(IS_FREEBSD) // In the case of Mac, there's always _NSGetEnviron() which we can read. + // In the case of FreeBSD, it's the "environ" variable. char **envp; for (envp = environ; envp && *envp; envp++) {