diff options
Diffstat (limited to 'net-analyzer/suricata/files')
-rw-r--r-- | net-analyzer/suricata/files/suricata-7.0.3_fix-build-with-gcc14.patch | 39 | ||||
-rw-r--r-- | net-analyzer/suricata/files/suricata-7.0.5_configure-fortify_source.patch | 18 |
2 files changed, 18 insertions, 39 deletions
diff --git a/net-analyzer/suricata/files/suricata-7.0.3_fix-build-with-gcc14.patch b/net-analyzer/suricata/files/suricata-7.0.3_fix-build-with-gcc14.patch deleted file mode 100644 index 7ebacf76852c..000000000000 --- a/net-analyzer/suricata/files/suricata-7.0.3_fix-build-with-gcc14.patch +++ /dev/null @@ -1,39 +0,0 @@ -Bug: From b5280929c58559c178415ce199157b5c87171258 Mon Sep 17 00:00:00 2001 -From: Brahmajit Das <brahmajit.xyz@gmail.com> -Date: Tue, 20 Feb 2024 12:05:57 +0530 -Subject: [PATCH 1/1] Fix passing incompatible pointer type with GCC 14 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -GCC 14 (and newer compilers like Clang 16) enables --Wincompatible-pointer-types by default, along with some other flags. -Thus resulting in build errors such as - -util-host-info.c: In function ‘SCKernelVersionIsAtLeast’: -util-host-info.c:94:31: error: passing argument 1 of ‘pcre2_substring_list_free_8’ from incompatible pointer type [-Wincompatible-pointer-types] - 94 | pcre2_substring_list_free((PCRE2_SPTR *)list); - | ^~~~~~~~~~~~~~~~~~ - | | - | const PCRE2_UCHAR8 ** {aka const unsigned char **} - -Removing the casting make suricata build with GCC 14. - -First discovered on Gentoo Linux with GCC 14 - -Bug: https://bugs.gentoo.org/925011 -Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com> ---- a/src/util-host-info.c -+++ b/src/util-host-info.c -@@ -91,7 +91,7 @@ int SCKernelVersionIsAtLeast(int major, int minor) - err = true; - } - -- pcre2_substring_list_free((PCRE2_SPTR *)list); -+ pcre2_substring_list_free(list); - pcre2_match_data_free(version_regex_match); - pcre2_code_free(version_regex); - --- -2.43.2 - diff --git a/net-analyzer/suricata/files/suricata-7.0.5_configure-fortify_source.patch b/net-analyzer/suricata/files/suricata-7.0.5_configure-fortify_source.patch new file mode 100644 index 000000000000..302f9bb382f3 --- /dev/null +++ b/net-analyzer/suricata/files/suricata-7.0.5_configure-fortify_source.patch @@ -0,0 +1,18 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -339,15 +339,6 @@ + [AC_MSG_RESULT(no)]) + CFLAGS="${TMPCFLAGS}" + +- #compile-time best-practices errors for certain libc functions, provides checks of buffer lengths and memory regions +- AC_MSG_CHECKING(for -D_FORTIFY_SOURCE=2) +- TMPCFLAGS="${CFLAGS}" +- CFLAGS="${CFLAGS} -D_FORTIFY_SOURCE=2" +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[SECCFLAGS="${SECCFLAGS} -D_FORTIFY_SOURCE=2" +- AC_MSG_RESULT(yes)], +- [AC_MSG_RESULT(no)]) +- CFLAGS="${TMPCFLAGS}" +- + #compile-time warnings about misuse of format strings + AC_MSG_CHECKING(for -Wformat -Wformat-security) + TMPCFLAGS="${CFLAGS}" |