]> granicus.if.org Git - sudo/commitdiff
Don't permanently add -D_FORTIFY_SOURCE=2 to CPPFLAGS
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 10 Feb 2012 19:28:10 +0000 (14:28 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 10 Feb 2012 19:28:10 +0000 (14:28 -0500)
configure
configure.in

index 0b8e311212302d847a6efe7d1e88679209240e24..d6a578a491437e59365717ef68b5ac1fb50db438 100755 (executable)
--- a/configure
+++ b/configure
@@ -16376,7 +16376,8 @@ done
 fi
 done
 
-O_CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
+O_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
 ac_fn_c_check_func "$LINENO" "__sprintf_chk" "ac_cv_func___sprintf_chk"
 if test "x$ac_cv_func___sprintf_chk" = xyes; then :
 
index a3eaad998686a61aa065ca774086b998c1d01c5c..5893b7da6e8bb8d605c9a40c483619d73a91f4c2 100644 (file)
@@ -2089,7 +2089,8 @@ AC_CHECK_FUNCS(getline, [], [
 dnl
 dnl If libc supports _FORTIFY_SOURCE check functions, use it.
 dnl
-O_CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
+O_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
 AC_CHECK_FUNC(__sprintf_chk, [
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[char buf[4]; (void)sprintf(buf, "%s", "foo");]])], [OSDEFS="${OSDEFS} -D_FORTIFY_SOURCE=2"], [])
 ], [])