summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-07-31 13:03:07 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-16 11:06:18 +0200
commit6d47f5a168e350a6d9cbddb343ff9d75ffbd2c04 (patch)
tree12dd77c1b63c776a6f5926424b242ba366d09936 /src/gui/dialogs
parentfdecdc39399994d2c0309005922590e2f106bbef (diff)
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>
Diffstat (limited to 'src/gui/dialogs')
-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 92ffedceaa..7df8197d8f 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);