From: Timo Sirainen Date: Fri, 22 Dec 2017 07:36:48 +0000 (+0200) Subject: m4: Avoid _FORTIFY_SOURCE redefinition warnings X-Git-Tag: 2.3.9~2623 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed97ec6905f3d024058a7c3643358a1b807be243;p=thirdparty%2Fdovecot%2Fcore.git m4: Avoid _FORTIFY_SOURCE redefinition warnings Some source based distros like Gentoo already enable -D_FORTIFY_SOURCE=2 by default resulting in the following warnings during build: :0:0: warning: "_FORTIFY_SOURCE" redefined : note: this is the location of the previous definition Patch by Eray Aslan --- diff --git a/m4/cc_fortify.m4 b/m4/cc_fortify.m4 index 3137eece85..070c75705f 100644 --- a/m4/cc_fortify.m4 +++ b/m4/cc_fortify.m4 @@ -8,7 +8,7 @@ AC_DEFUN([AC_CC_D_FORTIFY_SOURCE],[ case "$host" in *) gl_COMPILER_OPTION_IF([-O2 -D_FORTIFY_SOURCE=2], [ - CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" + CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" ], [], [AC_LANG_PROGRAM([[