From 33ea536021e6b8a57569af46e46eeed838f66572 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Tue, 6 Oct 2026 18:20:05 +0200 Subject: [PATCH] package/snort3: fix build error with numa support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Buildroot commit 5e78c6cf3323b4a45f84bcbc504f511dd268e270 bumped the package from 3.1.40.0 to 3.11.1.0. Upstream commit https://github.com/snort3/snort3/commit/83e9a2dda250a0ced9a105454a5a4fe59c304601 added numa support, first included in release 3.1.65.0. This causes a build error due to the numactl package being pulled-in as optional dependency by hwloc, the latter being a hard dependency of snort3. Fixes: https://autobuild.buildroot.net/results/e8a/e8a9d787973fd109c07c185103de1f9f7339d506/ Signed-off-by: Bernd Kuhls Cc: Fabrice Fontaine Signed-off-by: Thomas Petazzoni (cherry picked from commit 4fab16d9c25ed5869073e17051f1c1ef8cb028e4) Signed-off-by: Raphaël Mélotte --- .../0001-Rename-numa.h-to-numa_snort.h.patch | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 package/snort3/0001-Rename-numa.h-to-numa_snort.h.patch diff --git a/package/snort3/0001-Rename-numa.h-to-numa_snort.h.patch b/package/snort3/0001-Rename-numa.h-to-numa_snort.h.patch new file mode 100644 index 0000000000..ca8f7774f1 --- /dev/null +++ b/package/snort3/0001-Rename-numa.h-to-numa_snort.h.patch @@ -0,0 +1,79 @@ +From 3bb2a8fc1244fcbdf24235e541fa2a06a655dcea Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Tue, 8 Sep 2026 21:20:04 +0200 +Subject: [PATCH] Rename numa.h to numa_snort.h + +Fixes https://github.com/snort3/snort3/issues/368 + +and a build error seen with gcc 15.1.0 by the buildroot autobuilders: +https://autobuild.buildroot.net/results/e8a/e8a9d787973fd109c07c185103de1f9f7339d506/build-end.log + +/home/autobuild/autobuild/instance-44/output-1/build/snort3-3.11.1.0/src/main/numa.h: + In member function 'virtual int NumaWrapper::available()': +/home/autobuild/autobuild/instance-44/output-1/build/snort3-3.11.1.0/src/main/numa.h:50:16: + error: 'numa_available' was not declared in this scope; did you mean 'available'? + 50 | return numa_available(); + +/home/autobuild/autobuild/instance-44/output-1/build/snort3-3.11.1.0/src/main/numa.h: + In member function 'virtual int NumaWrapper::max_node()': +/home/autobuild/autobuild/instance-44/output-1/build/snort3-3.11.1.0/src/main/numa.h:54:16: + error: 'numa_max_node' was not declared in this scope; did you mean 'max_node'? + 54 | return numa_max_node(); + +Upstream: https://github.com/snort3/snort3/pull/479 + +Signed-off-by: Bernd Kuhls +--- + src/main/CMakeLists.txt | 2 +- + src/main/numa.cc | 2 +- + src/main/{numa.h => numa_snort.h} | 0 + src/main/thread_config.h | 2 +- + 4 files changed, 3 insertions(+), 3 deletions(-) + rename src/main/{numa.h => numa_snort.h} (100%) + +diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt +index 117612b94..e4e816d15 100644 +--- a/src/main/CMakeLists.txt ++++ b/src/main/CMakeLists.txt +@@ -23,7 +23,7 @@ endif ( ENABLE_SHELL ) + add_subdirectory(test) + + if ( HAVE_NUMA ) +- set ( NUMA_SOURCES numa.h numa.cc) ++ set ( NUMA_SOURCES numa_snort.h numa.cc) + endif( HAVE_NUMA ) + + add_library (main OBJECT +diff --git a/src/main/numa.cc b/src/main/numa.cc +index 259f776b7..5cb23e26b 100644 +--- a/src/main/numa.cc ++++ b/src/main/numa.cc +@@ -17,7 +17,7 @@ + //-------------------------------------------------------------------------- + // numa.cc author Denys Zikratyi + +-#include "numa.h" ++#include "numa_snort.h" + + #ifdef HAVE_CONFIG_H + #include "config.h" +diff --git a/src/main/numa.h b/src/main/numa_snort.h +similarity index 100% +rename from src/main/numa.h +rename to src/main/numa_snort.h +diff --git a/src/main/thread_config.h b/src/main/thread_config.h +index 93bfe63d2..8134da8bf 100644 +--- a/src/main/thread_config.h ++++ b/src/main/thread_config.h +@@ -26,7 +26,7 @@ + #include "main/thread.h" + + #ifdef HAVE_NUMA +-#include "numa.h" ++#include "numa_snort.h" + #endif + + struct CpuSet; +-- +2.47.3 +