GCC 14 is more strict regarding const pointers conversion. Fix
conversion to let ntpong build with GCC 14 and updated rrdtool. The
patch is not submitted upstream yet, the project requires singing of
CLA.

Signed-off-by: Dmitry Baryshkov <[email protected]>
---
 .../0001-Follow-rrd-post-1.8-change.patch     | 32 +++++++++++++++++++
 .../recipes-support/ntopng/ntopng_5.2.1.bb    |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 
meta-networking/recipes-support/ntopng/files/0001-Follow-rrd-post-1.8-change.patch

diff --git 
a/meta-networking/recipes-support/ntopng/files/0001-Follow-rrd-post-1.8-change.patch
 
b/meta-networking/recipes-support/ntopng/files/0001-Follow-rrd-post-1.8-change.patch
new file mode 100644
index 000000000000..eefd4e1ab2ef
--- /dev/null
+++ 
b/meta-networking/recipes-support/ntopng/files/0001-Follow-rrd-post-1.8-change.patch
@@ -0,0 +1,32 @@
+From a3bd9efe78f9c381f19b99c8ceb7f52b4c2a52b8 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <[email protected]>
+Date: Wed, 5 Jun 2024 09:40:17 +0300
+Subject: [PATCH] Follow rrd post-1.8 change
+
+Git version of rrdtool has changed rrd_tune argument from char pointer
+to const char pointer. GCC 14 is more strict regarding the pointer
+constantness checks and errors out in such a case. Update rrd_tune
+invokation.
+
+Signed-off-by: Dmitry Baryshkov <[email protected]>
+Upstream-Status: Pending [CLA is not signed on our side]
+---
+ src/LuaEngineNtop.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/LuaEngineNtop.cpp b/src/LuaEngineNtop.cpp
+index bd2de79e3021..dd00f1608f78 100644
+--- a/src/LuaEngineNtop.cpp
++++ b/src/LuaEngineNtop.cpp
+@@ -5427,7 +5427,7 @@ static int ntop_rrd_tune(lua_State* vm) {
+   filename = argv[1];
+ 
+   reset_rrd_state();
+-  status = rrd_tune(argc, (char**)argv);
++  status = rrd_tune(argc, (const char**)argv);
+ 
+   if(status != 0) {
+     char *err = rrd_get_error();
+-- 
+2.39.2
+
diff --git a/meta-networking/recipes-support/ntopng/ntopng_5.2.1.bb 
b/meta-networking/recipes-support/ntopng/ntopng_5.2.1.bb
index a9ace9b41267..9bb93910f89a 100644
--- a/meta-networking/recipes-support/ntopng/ntopng_5.2.1.bb
+++ b/meta-networking/recipes-support/ntopng/ntopng_5.2.1.bb
@@ -19,6 +19,7 @@ SRC_URI = 
"git://github.com/ntop/ntopng.git;protocol=https;branch=5.2-stable \
            file://0001-autogen.sh-generate-configure.ac-only.patch \
            file://0001-configure.ac.in-not-check-clang-on-host.patch \
            
file://0001-configure.ac.in-Allow-dynamic-linking-against-ndpi-3.patch \
+           file://0001-Follow-rrd-post-1.8-change.patch \
            file://ntopng.service \
            "
 
-- 
2.39.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#110699): 
https://lists.openembedded.org/g/openembedded-devel/message/110699
Mute This Topic: https://lists.openembedded.org/mt/106499229/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to