Commit af9978fd authored by Chris Stylianou's avatar Chris Stylianou Committed by Oswald Buddenhagen
Browse files

Fix incorrect uname usage.

The POSIX function uname() can return any non-negative value for success.
- Example: Solaris 10 returns 1 on success.

Change-Id: Ic3d51f94a31d8b562b28a2d09df3d31b04c77dc8
Reviewed-by: default avatarOswald Buddenhagen <>
(cherry picked from qtbase/e97c37a37ac27f9ab901e974f0a882e81ffd571d)
Reviewed-by: default avatarDaniel Teske <>
parent 2767b77d
......@@ -1026,7 +1026,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("")] << ProString(QString::fromLocal8Bit(name.nodename));
vars[ProKey("QMAKE_HOST.version")] << ProString(name.release);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment