summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess_unix.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-05-02 09:38:40 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-05-02 09:38:40 +0200
commitaae6ef391d2ee2fa5b91c834ea65f14fd61e5af6 (patch)
tree6ddb50540cb3277ecbc6bd694e4bddb62e43d57f /src/corelib/io/qprocess_unix.cpp
parente4de914405880c90298eae1115d39618384758e4 (diff)
fix build on mac
environ needs to be declared properly
Diffstat (limited to 'src/corelib/io/qprocess_unix.cpp')
-rw-r--r--src/corelib/io/qprocess_unix.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index 47f3e69cad..a3c589f177 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -453,6 +453,18 @@ bool QProcessPrivate::createChannel(Channel &channel)
}
}
+QT_BEGIN_INCLUDE_NAMESPACE
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron())
+#elif defined(Q_OS_SYMBIAN) || (defined(Q_OS_MAC) && defined(QT_NO_CORESERVICES))
+ static char *qt_empty_environ[] = { 0 };
+#define environ qt_empty_environ
+#else
+ extern char **environ;
+#endif
+QT_END_INCLUDE_NAMESPACE
+
QProcessEnvironment QProcessEnvironment::systemEnvironment()
{
QProcessEnvironment env;