diff options
| -rw-r--r-- | meta-networking/recipes-connectivity/snort/snort/0001-Fix-build-with-gcc-15.patch | 110 | ||||
| -rw-r--r-- | meta-networking/recipes-connectivity/snort/snort_2.9.20.bb | 1 |
2 files changed, 111 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/snort/snort/0001-Fix-build-with-gcc-15.patch b/meta-networking/recipes-connectivity/snort/snort/0001-Fix-build-with-gcc-15.patch new file mode 100644 index 0000000000..c221172cc8 --- /dev/null +++ b/meta-networking/recipes-connectivity/snort/snort/0001-Fix-build-with-gcc-15.patch | |||
| @@ -0,0 +1,110 @@ | |||
| 1 | From cc3724348c8e6371351e4370f158d17f28838e3b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Martin Jansa <martin.jansa@gmail.com> | ||
| 3 | Date: Sat, 26 Apr 2025 11:40:45 +0200 | ||
| 4 | Subject: [PATCH] Fix build with gcc-15 | ||
| 5 | |||
| 6 | * fixes: | ||
| 7 | http://errors.yoctoproject.org/Errors/Details/852983/ | ||
| 8 | |||
| 9 | ../../../../../snort-2.9.20/src/preprocessors/HttpInspect/files/file_decomp_PDF.c:1062:13: error: conflicting types for 'File_Decomp_PDF'; have 'fd_status_t(struct fd_session_s *)' {aka 'enum fd_status(struct fd_session_s *)'} | ||
| 10 | 1062 | fd_status_t File_Decomp_PDF( fd_session_p_t SessionPtr ) | ||
| 11 | | ^~~~~~~~~~~~~~~ | ||
| 12 | In file included from ../../../../../snort-2.9.20/src/preprocessors/HttpInspect/include/file_decomp.h:59, | ||
| 13 | from ../../../../../snort-2.9.20/src/preprocessors/HttpInspect/files/file_decomp_PDF.c:31: | ||
| 14 | ../../../../../snort-2.9.20/src/preprocessors/HttpInspect/include/file_decomp_PDF.h:83:13: note: previous declaration of 'File_Decomp_PDF' with type 'fd_status_t(void)' {aka 'enum fd_status(void)'} | ||
| 15 | 83 | fd_status_t File_Decomp_PDF(); | ||
| 16 | | ^~~~~~~~~~~~~~~ | ||
| 17 | make[5]: *** [Makefile:374: file_decomp_PDF.o] Error 1 | ||
| 18 | make[5]: *** Waiting for unfinished jobs.... | ||
| 19 | ../../../../../snort-2.9.20/src/preprocessors/HttpInspect/files/file_decomp.c: In function 'Process_Decompression': | ||
| 20 | ../../../../../snort-2.9.20/src/preprocessors/HttpInspect/files/file_decomp.c:245:24: error: too many arguments to function 'File_Decomp_PDF'; expected 0, have 1 | ||
| 21 | 245 | Ret_Code = File_Decomp_PDF( SessionPtr ); | ||
| 22 | | ^~~~~~~~~~~~~~~ ~~~~~~~~~~ | ||
| 23 | In file included from ../../../../../snort-2.9.20/src/preprocessors/HttpInspect/include/file_decomp.h:59, | ||
| 24 | from ../../../../../snort-2.9.20/src/preprocessors/HttpInspect/files/file_decomp.c:34: | ||
| 25 | ../../../../../snort-2.9.20/src/preprocessors/HttpInspect/include/file_decomp_PDF.h:83:13: note: declared here | ||
| 26 | 83 | fd_status_t File_Decomp_PDF(); | ||
| 27 | | ^~~~~~~~~~~~~~~ | ||
| 28 | |||
| 29 | http://errors.yoctoproject.org/Errors/Details/852992/ | ||
| 30 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c: In function 'DCE2_InitGlobal': | ||
| 31 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c:348:25: error: too many arguments to function 'DCE2_GetReloadSafeMemcap'; expected 0, have 1 | ||
| 32 | 348 | size_t memcap = DCE2_GetReloadSafeMemcap(dce2_config); | ||
| 33 | | ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~ | ||
| 34 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c:163:17: note: declared here | ||
| 35 | 163 | static uint32_t DCE2_GetReloadSafeMemcap(); | ||
| 36 | | ^~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 37 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c: In function 'DCE2_ReloadGlobal': | ||
| 38 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c:1291:25: error: too many arguments to function 'DCE2_GetReloadSafeMemcap'; expected 0, have 1 | ||
| 39 | 1291 | size_t memcap = DCE2_GetReloadSafeMemcap(dce2_swap_config); | ||
| 40 | | ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~ | ||
| 41 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c:163:17: note: declared here | ||
| 42 | 163 | static uint32_t DCE2_GetReloadSafeMemcap(); | ||
| 43 | | ^~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 44 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c: In function 'DCE2_ReloadVerify': | ||
| 45 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c:1436:35: error: too many arguments to function 'DCE2_GetReloadSafeMemcap'; expected 0, have 1 | ||
| 46 | 1436 | uint32_t current_memcap = DCE2_GetReloadSafeMemcap(dce2_config); | ||
| 47 | | ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~ | ||
| 48 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c:163:17: note: declared here | ||
| 49 | 163 | static uint32_t DCE2_GetReloadSafeMemcap(); | ||
| 50 | | ^~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 51 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c:1437:35: error: too many arguments to function 'DCE2_GetReloadSafeMemcap'; expected 0, have 1 | ||
| 52 | 1437 | uint32_t new_memcap = DCE2_GetReloadSafeMemcap(dce2_swap_config); | ||
| 53 | | ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~ | ||
| 54 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c:163:17: note: declared here | ||
| 55 | 163 | static uint32_t DCE2_GetReloadSafeMemcap(); | ||
| 56 | | ^~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 57 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c: In function 'DCE2_ReloadSwap': | ||
| 58 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c:1535:26: error: too many arguments to function 'DCE2_GetReloadSafeMemcap'; expected 0, have 1 | ||
| 59 | 1535 | current_memcap = DCE2_GetReloadSafeMemcap(dce2_config); | ||
| 60 | | ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~ | ||
| 61 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c:163:17: note: declared here | ||
| 62 | 163 | static uint32_t DCE2_GetReloadSafeMemcap(); | ||
| 63 | | ^~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 64 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c:1538:26: error: too many arguments to function 'DCE2_GetReloadSafeMemcap'; expected 0, have 1 | ||
| 65 | 1538 | swap_memcap = DCE2_GetReloadSafeMemcap(dce2_swap_config); | ||
| 66 | | ^~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~ | ||
| 67 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c:163:17: note: declared here | ||
| 68 | 163 | static uint32_t DCE2_GetReloadSafeMemcap(); | ||
| 69 | | ^~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 70 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c: At top level: | ||
| 71 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c:1673:17: error: conflicting types for 'DCE2_GetReloadSafeMemcap'; have 'uint32_t(tSfPolicyUserContext *)' {aka 'unsigned int(tSfPolicyUserContext *)'} | ||
| 72 | 1673 | static uint32_t DCE2_GetReloadSafeMemcap(tSfPolicyUserContextId pConfig) | ||
| 73 | | ^~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 74 | ../../../../snort-2.9.20/src/dynamic-preprocessors/dcerpc2/spp_dce2.c:163:17: note: previous declaration of 'DCE2_GetReloadSafeMemcap' with type 'uint32_t(void)' {aka 'unsigned int(void)'} | ||
| 75 | 163 | static uint32_t DCE2_GetReloadSafeMemcap(); | ||
| 76 | | ^~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 77 | |||
| 78 | Upstream-Status: Backport [resolved in snort3 https://github.com/snort3/snort3/commit/c3cc27355ac302bd24ee3e9d613166898ec2be64] | ||
| 79 | |||
| 80 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
| 81 | --- | ||
| 82 | src/dynamic-preprocessors/dcerpc2/spp_dce2.c | 2 +- | ||
| 83 | src/preprocessors/HttpInspect/include/file_decomp_PDF.h | 2 +- | ||
| 84 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
| 85 | |||
| 86 | diff --git a/src/dynamic-preprocessors/dcerpc2/spp_dce2.c b/src/dynamic-preprocessors/dcerpc2/spp_dce2.c | ||
| 87 | index 7fd78ee..150645f 100644 | ||
| 88 | --- a/src/dynamic-preprocessors/dcerpc2/spp_dce2.c | ||
| 89 | +++ b/src/dynamic-preprocessors/dcerpc2/spp_dce2.c | ||
| 90 | @@ -160,7 +160,7 @@ static void DCE2_ReloadSwapFree(void *); | ||
| 91 | static void DCE2_AddPortsToPaf(struct _SnortConfig *, DCE2_Config *, tSfPolicyId); | ||
| 92 | static void DCE2_ScAddPortsToPaf(struct _SnortConfig *, void *); | ||
| 93 | static uint32_t max(uint32_t a, uint32_t b); | ||
| 94 | -static uint32_t DCE2_GetReloadSafeMemcap(); | ||
| 95 | +static uint32_t DCE2_GetReloadSafeMemcap(tSfPolicyUserContextId pConfig); | ||
| 96 | |||
| 97 | static bool dce2_file_cache_is_enabled = false; | ||
| 98 | static bool dce2_file_cache_was_enabled = false; | ||
| 99 | diff --git a/src/preprocessors/HttpInspect/include/file_decomp_PDF.h b/src/preprocessors/HttpInspect/include/file_decomp_PDF.h | ||
| 100 | index 8d39185..0e624f7 100644 | ||
| 101 | --- a/src/preprocessors/HttpInspect/include/file_decomp_PDF.h | ||
| 102 | +++ b/src/preprocessors/HttpInspect/include/file_decomp_PDF.h | ||
| 103 | @@ -80,6 +80,6 @@ fd_status_t File_Decomp_Init_PDF( fd_session_p_t SessionPtr ); | ||
| 104 | |||
| 105 | fd_status_t File_Decomp_End_PDF( fd_session_p_t SessionPtr ); | ||
| 106 | |||
| 107 | -fd_status_t File_Decomp_PDF(); | ||
| 108 | +fd_status_t File_Decomp_PDF( fd_session_p_t SessionPtr ); | ||
| 109 | |||
| 110 | #endif /* FILE_DECOMP_PDF_H */ | ||
diff --git a/meta-networking/recipes-connectivity/snort/snort_2.9.20.bb b/meta-networking/recipes-connectivity/snort/snort_2.9.20.bb index 9bc14fc56f..7f1b779cc4 100644 --- a/meta-networking/recipes-connectivity/snort/snort_2.9.20.bb +++ b/meta-networking/recipes-connectivity/snort/snort_2.9.20.bb | |||
| @@ -15,6 +15,7 @@ SRC_URI = "https://www.snort.org/downloads/archive/snort/${BP}.tar.gz \ | |||
| 15 | file://fix-host-contamination-when-enable-static-daq.patch \ | 15 | file://fix-host-contamination-when-enable-static-daq.patch \ |
| 16 | file://disable-run-test-program-while-cross-compiling.patch \ | 16 | file://disable-run-test-program-while-cross-compiling.patch \ |
| 17 | file://configure.in-disable-tirpc-checking-for-fedora.patch \ | 17 | file://configure.in-disable-tirpc-checking-for-fedora.patch \ |
| 18 | file://0001-Fix-build-with-gcc-15.patch \ | ||
| 18 | " | 19 | " |
| 19 | SRC_URI[sha256sum] = "29400e13f53b1831e0b8b10ec1224a1cbaa6dc1533a5322a20dd80bb84b4981c" | 20 | SRC_URI[sha256sum] = "29400e13f53b1831e0b8b10ec1224a1cbaa6dc1533a5322a20dd80bb84b4981c" |
| 20 | 21 | ||
