Skip to content

Commit 98dfe51

Browse files
committed
simx86: check for __has_feature
It's only in newer GCC and clang
1 parent 9cd8590 commit 98dfe51

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/base/emu-i386/simx86/interval-tree.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
* On some architectures, qatomic_set_mb is more efficient than a store
3434
* plus a fence.
3535
*/
36+
#ifndef __has_feature
37+
#define __has_feature(x) 0 /* compatibility with non-clang compilers */
38+
#endif
3639
#if defined(__SANITIZE_THREAD__) || __has_feature(thread_sanitizer)
3740
# define SANITIZE_THREAD 1
3841
#endif

0 commit comments

Comments
 (0)