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 <thiago.macieira@intel.com>
This commit is contained in:
parent
f64c992ec5
commit
ab352b8b0d
@ -345,17 +345,17 @@ QString QFileSystemEngine::resolveUserName(uint userId)
|
|||||||
QVarLengthArray<char, 1024> buf(size_max);
|
QVarLengthArray<char, 1024> buf(size_max);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct passwd *pw = 0;
|
|
||||||
#if !defined(Q_OS_INTEGRITY)
|
#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)
|
#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_VXWORKS)
|
||||||
struct passwd entry;
|
struct passwd entry;
|
||||||
getpwuid_r(userId, &entry, buf.data(), buf.size(), &pw);
|
getpwuid_r(userId, &entry, buf.data(), buf.size(), &pw);
|
||||||
#else
|
#else
|
||||||
pw = getpwuid(userId);
|
pw = getpwuid(userId);
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
if (pw)
|
if (pw)
|
||||||
return QFile::decodeName(QByteArray(pw->pw_name));
|
return QFile::decodeName(QByteArray(pw->pw_name));
|
||||||
|
#endif
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -369,8 +369,8 @@ QString QFileSystemEngine::resolveGroupName(uint groupId)
|
|||||||
QVarLengthArray<char, 1024> buf(size_max);
|
QVarLengthArray<char, 1024> buf(size_max);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct group *gr = 0;
|
|
||||||
#if !defined(Q_OS_INTEGRITY)
|
#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)
|
#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);
|
size_max = sysconf(_SC_GETGR_R_SIZE_MAX);
|
||||||
if (size_max == -1)
|
if (size_max == -1)
|
||||||
@ -389,10 +389,10 @@ QString QFileSystemEngine::resolveGroupName(uint groupId)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
gr = getgrgid(groupId);
|
gr = getgrgid(groupId);
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
if (gr)
|
if (gr)
|
||||||
return QFile::decodeName(QByteArray(gr->gr_name));
|
return QFile::decodeName(QByteArray(gr->gr_name));
|
||||||
|
#endif
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user