From ab352b8b0d5dbebfc15e27f779fe82eb6c73feb6 Mon Sep 17 00:00:00 2001 From: Rolland Dudemaine Date: Tue, 27 Oct 2015 02:06:47 +0100 Subject: pwd and group variables should be declared inside Q_OS_INTEGRITY. The variables were always intended to be located inside the #ifdef Q_OS_INTEGRITY. Change-Id: I5e223ff8b5b2a686e4b45e2b8eb731e8406a199f Reviewed-by: Thiago Macieira --- src/corelib/io/qfilesystemengine_unix.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index 83d556b639..8f6d9911e8 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -345,17 +345,17 @@ QString QFileSystemEngine::resolveUserName(uint userId) QVarLengthArray buf(size_max); #endif - struct passwd *pw = 0; #if !defined(Q_OS_INTEGRITY) + struct passwd *pw = 0; #if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_VXWORKS) struct passwd entry; getpwuid_r(userId, &entry, buf.data(), buf.size(), &pw); #else pw = getpwuid(userId); -#endif #endif if (pw) return QFile::decodeName(QByteArray(pw->pw_name)); +#endif return QString(); } @@ -369,8 +369,8 @@ QString QFileSystemEngine::resolveGroupName(uint groupId) QVarLengthArray buf(size_max); #endif - struct group *gr = 0; #if !defined(Q_OS_INTEGRITY) + struct group *gr = 0; #if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_VXWORKS) size_max = sysconf(_SC_GETGR_R_SIZE_MAX); if (size_max == -1) @@ -389,10 +389,10 @@ QString QFileSystemEngine::resolveGroupName(uint groupId) } #else gr = getgrgid(groupId); -#endif #endif if (gr) return QFile::decodeName(QByteArray(gr->gr_name)); +#endif return QString(); } -- cgit v1.2.3