Fix incorrect uname usage.
The POSIX function uname() can return any non-negative value for success. - Example: Solaris 10 returns 1 on success. See: http://pubs.opengroup.org/onlinepubs/009695399/functions/uname.html Change-Id: Ic3d51f94a31d8b562b28a2d09df3d31b04c77dc8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
parent
e02c6dd1d3
commit
e97c37a37a
@ -1037,7 +1037,7 @@ void QMakeEvaluator::loadDefaults()
|
||||
# endif
|
||||
#elif defined(Q_OS_UNIX)
|
||||
struct utsname name;
|
||||
if (!uname(&name)) {
|
||||
if (uname(&name) != -1) {
|
||||
vars[ProKey("QMAKE_HOST.os")] << ProString(name.sysname);
|
||||
vars[ProKey("QMAKE_HOST.name")] << ProString(QString::fromLocal8Bit(name.nodename));
|
||||
vars[ProKey("QMAKE_HOST.version")] << ProString(name.release);
|
||||
|
Loading…
Reference in New Issue
Block a user