diff --git a/configure.ac b/configure.ac index c5eaf99c..8fc2662a 100644 --- a/configure.ac +++ b/configure.ac @@ -503,15 +503,17 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then CXXFLAGS="$CXXFLAGS -Wall" MN_ADD_CFLAGS([-Wextra]) - - AC_LANG_PUSH([C++]) - MN_ADD_CXXFLAGS([-Wextra]) - AC_LANG_POP([C++]) - MN_ADD_CFLAGS([-Wdeclaration-after-statement]) MN_ADD_CFLAGS([-Wpointer-arith]) MN_ADD_CFLAGS([-funsigned-char]) + AC_LANG_PUSH([C++]) + MN_ADD_CXXFLAGS([-Wextra]) + MN_ADD_CXXFLAGS([-Wpointer-arith]) + MN_ADD_CXXFLAGS([-funsigned-char]) + AC_LANG_POP([C++]) + + MN_ADD_CFLAGS([-D_FORTIFY_SOURCE=2]) if test x$enable_stack_smash_protection = "xyes" ; then