mirror of https://github.com/openwrt/packages.git
rrdtool1: fix compilation with GCC14
gnu standard is needed. Easier to remove the CFLAG. Signed-off-by: Rosen Penev <rosenp@gmail.com>pull/24124/head
parent
e44aae02d0
commit
710a6fb79b
utils/rrdtool1
patches
|
@ -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) \
|
||||
|
|
|
@ -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 <cgi.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <strings.h>
|
||||
#include <time.h>
|
||||
|
||||
|
||||
@@ -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,
|
Loading…
Reference in New Issue