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>
This commit is contained in:
Mitch Curtis 2020-10-09 15:56:54 +02:00
parent 0a0949837e
commit 4897aa8b5f

View File

@ -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)
{