summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qmutex_linux.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-05-25 09:47:57 -0700
committerThiago Macieira <thiago.macieira@intel.com>2016-05-26 18:31:22 +0000
commit5fe16358bbbcd1a6fdd4904b01ffcec4a9eee5d8 (patch)
tree89403d282d2988082e78ba71e2c98537c0b02c20 /src/corelib/thread/qmutex_linux.cpp
parentf9b7385e24a319536506b95ceb70ba0e5dc6d5c3 (diff)
Fix use of QMutex on Linux before FUTEX_PRIVATE_FLAG was added
It was added in 2.6.22. If we pass it to 2.6.21, we'll get -ENOSYS, which is bad for QMutex. This fix simply defines it to 0 if the header doesn't define it. But as a consequence: if Qt is built with newer kernel headers, it won't run on older versions. It's not likely that someone is still using Qt 5.7 on a 2.6.21 kernel (v2.6.21.7 was released on 2007-08-04). Change-Id: Icb178bb113bb437c9b67fffd1451dd7bb964f0c8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/thread/qmutex_linux.cpp')
-rw-r--r--src/corelib/thread/qmutex_linux.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/thread/qmutex_linux.cpp b/src/corelib/thread/qmutex_linux.cpp
index 25444ffff6..17072f44d4 100644
--- a/src/corelib/thread/qmutex_linux.cpp
+++ b/src/corelib/thread/qmutex_linux.cpp
@@ -57,7 +57,7 @@
#endif
#ifndef FUTEX_PRIVATE_FLAG
-# define FUTEX_PRIVATE_FLAG 128
+# define FUTEX_PRIVATE_FLAG 0
#endif