summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-07-31 11:03:07 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-16 09:06:18 (GMT)
commit6d47f5a168e350a6d9cbddb343ff9d75ffbd2c04 (patch)
tree12dd77c1b63c776a6f5926424b242ba366d09936
parentfdecdc39399994d2c0309005922590e2f106bbef (diff)
downloadQt-6d47f5a168e350a6d9cbddb343ff9d75ffbd2c04.zip
Qt-6d47f5a168e350a6d9cbddb343ff9d75ffbd2c04.tar.gz
Qt-6d47f5a168e350a6d9cbddb343ff9d75ffbd2c04.tar.bz2
Sun CC: Fix QFileDialog compilation
Only use the old getpwnam_r() function when _POSIX_C_SOURCE is defined. Task-number: QTBUG-21451 Change-Id: I6bfc4c9f784616fc08866542c34ed71ab69559e9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/gui/dialogs/qfiledialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index 92ffedc..7df8197 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -895,7 +895,7 @@ Q_AUTOTEST_EXPORT QString qt_tildeExpansion(const QString &path, bool *expanded
char buf[200];
const int bufSize = sizeof(buf);
int err = 0;
-#if defined(Q_OS_SOLARIS) && (_POSIX_C_SOURCE - 0 < 199506L)
+#if defined(Q_OS_SOLARIS) && defined(_POSIX_C_SOURCE) && (_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);