From d1840ef2ab511bc7edf1267789662fde13a91360 Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Sun, 11 Oct 2015 12:59:32 +0200 Subject: [PATCH] Allow use of --enable-asan under clang Apply the industry standard solution, as clang with -fsanitize=address apparently enables _FORTIFY_SOURCE, leading to a redefinition. --- m4/pdns_d_fortify_source.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/m4/pdns_d_fortify_source.m4 b/m4/pdns_d_fortify_source.m4 index 605990c47..68e9be5ef 100644 --- a/m4/pdns_d_fortify_source.m4 +++ b/m4/pdns_d_fortify_source.m4 @@ -22,7 +22,7 @@ AC_DEFUN([AC_CC_D_FORTIFY_SOURCE],[ OLD_CXXFLAGS="$CXXFLAGS" CXXFLAGS="-Wall -W -Werror $CXXFLAGS" gl_COMPILER_OPTION_IF([-D_FORTIFY_SOURCE=2], [ - CFLAGS="-D_FORTIFY_SOURCE=2 $CFLAGS" - CXXFLAGS="-D_FORTIFY_SOURCE=2 $OLD_CXXFLAGS" + CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" + CXXFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $OLD_CXXFLAGS" ], [CXXFLAGS="$OLD_CXXFLAGS"], [AC_LANG_PROGRAM([[#include ]],[])]) ]) -- 2.40.0