]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
configure: right test for AFLFUZZ_PERSISTANT_MODE 4731/head
authorPhilippe Antoine <contact@catenacyber.fr>
Thu, 26 Mar 2020 13:29:38 +0000 (14:29 +0100)
committerPhilippe Antoine <contact@catenacyber.fr>
Thu, 26 Mar 2020 13:29:38 +0000 (14:29 +0100)
configure.ac

index dd053c134b97b023ce11f800bd32e88b3612a2e1..e707d8f8ce89bac488f2d3aaf8e599013ad254df 100644 (file)
     AC_PROG_CXX
     AS_IF([test "x$enable_fuzztargets" = "xyes"], [
         AC_DEFINE([AFLFUZZ_NO_RANDOM], [1], [Disable all use of random functions])
+        CFLAGS_ORIG=$CFLAGS
+        CFLAGS="-Werror"
         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[while (__AFL_LOOP(1000))]])],
                 [AC_DEFINE([AFLFUZZ_PERSISTANT_MODE], [1], [Enable AFL PERSISTANT_MODE])],
                 [])
+        CFLAGS=$CFLAGS_ORIG
         AC_LANG_PUSH(C++)
         tmp_saved_flags=$[]_AC_LANG_PREFIX[]FLAGS
         AS_IF([test "x$LIB_FUZZING_ENGINE" = "x"], [