package/snort3: fix build error with numa support

Buildroot commit 5e78c6cf33 bumped the
package from 3.1.40.0 to 3.11.1.0. Upstream commit
83e9a2dda2
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 <bernd@kuhls.net>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Bernd Kuhls
2026-10-06 18:20:05 +02:00
committed by Thomas Petazzoni
parent e8194b1f22
commit 4fab16d9c2

View File

@@ -0,0 +1,79 @@
From 3bb2a8fc1244fcbdf24235e541fa2a06a655dcea Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd@kuhls.net>
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 <bernd@kuhls.net>
---
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 <dzikraty@cisco.com>
-#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