diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-05-02 09:38:40 +0200 |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-10 12:54:53 +0200 |
commit | 4d8cf471783a6e4c5e551c6ddf208acb03453e61 (patch) | |
tree | 5ae7b9a424160faebbb328b499a5d454a17bb5da /src | |
parent | 61b85df09b80374f2d4e5d2f6004d020b3cb05a8 (diff) |
fix build on mac
environ needs to be declared properly
(cherry picked from commit aae6ef391d2ee2fa5b91c834ea65f14fd61e5af6)
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qprocess_unix.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index 7a9e75d534..fcb0c4b47c 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -467,6 +467,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; |