lm_sensors/lm_sensors-3.6.0-rrd-const-argv.patch
Yaakov Selkowitz a964cc6044 Adapt to constification of argv parameters in rrdtool
The fix for rrdtool with GCC 14 essential changed the API, and
rebuilding lm_sensors now against that rrdtool build (which is only in
F40 and ELN) now fails.  Therefore, this patch is applied only for
affected versions.

https://github.com/lm-sensors/lm-sensors/pull/483
https://github.com/oetiker/rrdtool-1.x/pull/1242
508fac5285
2024-02-10 20:52:51 -05:00

27 lines
973 B
Diff

All uses of argv in rrdtool have been constified upstream:
https://github.com/oetiker/rrdtool-1.x/pull/1242
https://github.com/lm-sensors/lm-sensors/pull/483
diff -up ./prog/sensord/rrd.c.orig ./prog/sensord/rrd.c
--- ./prog/sensord/rrd.c.orig 2024-02-05 14:53:34.885969256 -0500
+++ ./prog/sensord/rrd.c 2024-02-05 14:55:09.337587596 -0500
@@ -299,7 +299,7 @@ int rrdInit(void)
argv[argc++] = rraBuff;
argv[argc] = NULL;
- ret = rrd_create(argc, (char**) argv);
+ ret = rrd_create(argc, argv);
if (ret == -1) {
sensorLog(LOG_ERR, "Error creating RRD file: %s: %s",
sensord_args.rrdFile, rrd_get_error());
@@ -455,7 +455,7 @@ int rrdUpdate(void)
const char *argv[] = {
"sensord", sensord_args.rrdFile, rrdBuff, NULL
};
- if ((ret = rrd_update(3, (char **) /* WEAK */ argv))) {
+ if ((ret = rrd_update(3, /* WEAK */ argv))) {
sensorLog(LOG_ERR, "Error updating RRD file: %s: %s",
sensord_args.rrdFile, rrd_get_error());
}