From 8903d68d69bfb843a75225f23c279f88d4107c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 19 Dec 2018 12:24:59 +0100 Subject: [PATCH] gcc defines __SANITIZE_ADDRESS__ and not __ADDRESS_SANITIZER__, use the correct #define --- bin/named/unix/dlz_dlopen_driver.c | 2 +- lib/dns/dyndb.c | 2 +- lib/isc/include/isc/util.h | 4 ++-- lib/ns/hooks.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/named/unix/dlz_dlopen_driver.c b/bin/named/unix/dlz_dlopen_driver.c index 016b390862..1a3e6e4f38 100644 --- a/bin/named/unix/dlz_dlopen_driver.c +++ b/bin/named/unix/dlz_dlopen_driver.c @@ -257,7 +257,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[], /* Open the library */ dlopen_flags = RTLD_NOW|RTLD_GLOBAL; -#if defined(RTLD_DEEPBIND) && !__ADDRESS_SANITIZER__ +#if defined(RTLD_DEEPBIND) && !__SANITIZE_ADDRESS__ /* * If RTLD_DEEPBIND is available then use it. This can avoid * issues with a module using a different version of a system diff --git a/lib/dns/dyndb.c b/lib/dns/dyndb.c index 47cb3374a3..0dcf5a5fe7 100644 --- a/lib/dns/dyndb.c +++ b/lib/dns/dyndb.c @@ -133,7 +133,7 @@ load_library(isc_mem_t *mctx, const char *filename, const char *instname, instname, filename); flags = RTLD_NOW|RTLD_LOCAL; -#if defined(RTLD_DEEPBIND) && !__ADDRESS_SANITIZER__ +#if defined(RTLD_DEEPBIND) && !__SANITIZE_ADDRESS__ flags |= RTLD_DEEPBIND; #endif diff --git a/lib/isc/include/isc/util.h b/lib/isc/include/isc/util.h index 06530d1cdc..a0e08bfc10 100644 --- a/lib/isc/include/isc/util.h +++ b/lib/isc/include/isc/util.h @@ -206,9 +206,9 @@ #define __has_feature(x) 0 #endif -/* GCC defines __ADDRESS_SANITIZER__, so reuse the macro for clang */ +/* GCC defines __SANITIZE_ADDRESS__, so reuse the macro for clang */ #if __has_feature(address_sanitizer) -#define __ADDRESS_SANITIZER__ +#define __SANITIZE_ADDRESS__ #endif #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR >= 6) diff --git a/lib/ns/hooks.c b/lib/ns/hooks.c index c5212428f1..83c390de3a 100644 --- a/lib/ns/hooks.c +++ b/lib/ns/hooks.c @@ -109,7 +109,7 @@ load_plugin(isc_mem_t *mctx, const char *modpath, ns_plugin_t **pluginp) { REQUIRE(pluginp != NULL && *pluginp == NULL); flags = RTLD_LAZY | RTLD_LOCAL; -#if defined(RTLD_DEEPBIND) && !__ADDRESS_SANITIZER__ +#if defined(RTLD_DEEPBIND) && !__SANITIZE_ADDRESS__ flags |= RTLD_DEEPBIND; #endif