From: Rosen Penev Date: Mon, 13 May 2024 03:21:01 +0000 (-0700) Subject: rrdtool1: fix compilation with GCC14 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=710a6fb79bf618aecde1db4f1eac79babfe70a2c;p=feed%2Fpackages.git rrdtool1: fix compilation with GCC14 gnu standard is needed. Easier to remove the CFLAG. Signed-off-by: Rosen Penev --- diff --git a/utils/rrdtool1/Makefile b/utils/rrdtool1/Makefile index a3e4f6510f..5b9885633b 100644 --- a/utils/rrdtool1/Makefile +++ b/utils/rrdtool1/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rrdtool1 PKG_VERSION:=1.0.50 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_BUILD_DIR:=$(BUILD_DIR)/rrdtool-$(PKG_VERSION) PKG_SOURCE:=rrdtool-$(PKG_VERSION).tar.gz @@ -86,7 +86,7 @@ $(call Package/rrdtool1/description/Default) This package contains command line tools used to manage RRDs. endef -TARGET_CFLAGS += $(FPIC) --std=c99 +TARGET_CFLAGS += $(FPIC) CONFIGURE_ARGS += \ $(DISABLE_NLS) \ diff --git a/utils/rrdtool1/patches/200-gcc14.patch b/utils/rrdtool1/patches/200-gcc14.patch new file mode 100644 index 0000000000..ed60933231 --- /dev/null +++ b/utils/rrdtool1/patches/200-gcc14.patch @@ -0,0 +1,57 @@ +--- a/src/rrd_cgi.c ++++ b/src/rrd_cgi.c +@@ -4,8 +4,14 @@ + * rrd_cgi.c RRD Web Page Generator + *****************************************************************************/ + ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE ++#endif ++ + #include "rrd_tool.h" + #include ++#include ++#include + #include + + +@@ -345,7 +351,7 @@ int main(int argc, char *argv[]) { + + if (!filter) { + printf ("Content-Type: text/html\n" +- "Content-Length: %d\n", ++ "Content-Length: %zd\n", + strlen(buffer)); + + if (labs(goodfor) > 0) { +--- a/src/rrd_graph.c ++++ b/src/rrd_graph.c +@@ -5,6 +5,10 @@ + * rrd__graph.c make creates ne rrds + ****************************************************************************/ + ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE ++#endif ++ + #include "rrd_tool.h" + + #ifdef WIN32 +@@ -2475,7 +2479,7 @@ copyImage(gdImagePtr gif, char *image, i + } + gdImageDestroy(img); + } +- close(fi); ++ fclose(fi); + } else { + rrd_set_error("Error Opeing %s: %s",image, strerror(errno)); + } +@@ -3308,7 +3312,7 @@ im.unit = 0; /* do not display unit if n + case GF_VRULE: + if(sscanf( + &argv[i][argstart], +- "%lu#%2x%2x%2x:%n", ++ "%ld#%2x%2x%2x:%n", + &im.gdes[im.gdes_c-1].xrule, + &col_red, + &col_green,