summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-10-09 15:56:54 +0200
committerMitch Curtis <mitch.curtis@qt.io>2020-10-12 13:47:40 +0200
commit4897aa8b5fdba8ae4b56fdad1ff923f6a6faf882 (patch)
treeb8ae01799eba17b60b77e97b6f54c22c09358882 /src/corelib/thread
parent0a0949837ec50b001595ad3f3eb032ed72d623ed (diff)
Fix build when configuring with -sanitize thread on gcc
There is no <sanitizer/tsan_interface.h> header when building with gcc, at least on Ubuntu 18.04.3. Fixes: QTBUG-87317 Change-Id: Ie933f6fa478f11b5062c665007e91be68e31ebe3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qfutex_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/thread/qfutex_p.h b/src/corelib/thread/qfutex_p.h
index 9ace807b91..e4bfeda5f8 100644
--- a/src/corelib/thread/qfutex_p.h
+++ b/src/corelib/thread/qfutex_p.h
@@ -81,7 +81,7 @@ QT_END_NAMESPACE
// if not defined in linux/futex.h
# define FUTEX_PRIVATE_FLAG 128 // added in v2.6.22
-# if __has_feature(thread_sanitizer) || defined(__SANITIZE_THREAD__)
+# if (__has_feature(thread_sanitizer) || defined(__SANITIZE_THREAD__)) && __has_include(<sanitizer/tsan_interface.h>)
# include <sanitizer/tsan_interface.h>
inline void _q_tsan_acquire(void *addr, void *addr2)
{