diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-09-22 18:44:55 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-09-22 18:44:55 (GMT) |
commit | 43a5b8d0d50b2e71a6a76899b3989552dae288c0 (patch) | |
tree | 07d49fc36a62296bfd8a7e42af43e95e0012a866 /src/gui | |
parent | 244ccf1cd7434b4f9ef4dbcdb39ae5c70610952c (diff) | |
parent | 48f64fc7ae9f0e9e8ab07ab60ccd55d3b053dfab (diff) | |
download | Qt-43a5b8d0d50b2e71a6a76899b3989552dae288c0.zip Qt-43a5b8d0d50b2e71a6a76899b3989552dae288c0.tar.gz Qt-43a5b8d0d50b2e71a6a76899b3989552dae288c0.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Fix broken Solaris build (getpwnam_r usage)
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/dialogs/qfiledialog.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index 5e8533e..817cd38 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -880,7 +880,12 @@ Q_AUTOTEST_EXPORT QString qt_tildeExpansion(const QString &path, bool *expanded passwd *tmpPw; char buf[200]; const int bufSize = sizeof(buf); - int err = getpwnam_r(userName.toLocal8Bit().constData(), &pw, buf, bufSize, &tmpPw); + int err = 0; +#if defined(Q_OS_SOLARIS) && (_POSIX_C_SOURCE - 0 < 199506L) + tmpPw = getpwnam_r(userName.toLocal8Bit().constData(), &pw, buf, bufSize); +#else + err = getpwnam_r(userName.toLocal8Bit().constData(), &pw, buf, bufSize, &tmpPw); +#endif if (err || !tmpPw) return ret; const QString homePath = QString::fromLocal8Bit(pw.pw_dir); |