summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-12-03 17:30:19 +0100
committerLennart Poettering <lennart@poettering.net>2018-12-03 17:35:50 +0100
commitbe5f77b26e22a806179c7b03e03d424682ed325c (patch)
tree3f44bafe2746394ec2be2d8a4c1e48dfb7222b8f
parentutil-lib: introduce HAS_FEATURE_ADDRESS_SANITIZER (diff)
downloadsystemd-be5f77b26e22a806179c7b03e03d424682ed325c.tar.xz
systemd-be5f77b26e22a806179c7b03e03d424682ed325c.zip
macro: define HAS_FEATURE_ADDRESS_SANITIZER also on gcc
Let's make differences between compilers more minimal.
-rw-r--r--src/basic/macro.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/basic/macro.h b/src/basic/macro.h
index 42ee753532..2213d4b9ac 100644
--- a/src/basic/macro.h
+++ b/src/basic/macro.h
@@ -61,7 +61,9 @@
#endif
#if !defined(HAS_FEATURE_ADDRESS_SANITIZER)
-# if defined(__has_feature)
+# ifdef __SANITIZE_ADDRESS__
+# define HAS_FEATURE_ADDRESS_SANITIZER 1
+# elif defined(__has_feature)
# if __has_feature(address_sanitizer)
# define HAS_FEATURE_ADDRESS_SANITIZER 1
# endif