diff options
Diffstat (limited to 'net-analyzer/suricata/files/suricata-7.0.3_fix-build-with-gcc14.patch')
-rw-r--r-- | net-analyzer/suricata/files/suricata-7.0.3_fix-build-with-gcc14.patch | 39 |
1 files changed, 39 insertions, 0 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 new file mode 100644 index 000000000000..7ebacf76852c --- /dev/null +++ b/net-analyzer/suricata/files/suricata-7.0.3_fix-build-with-gcc14.patch @@ -0,0 +1,39 @@ +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 + |