Files
ports/net-mgmt/pmacct/files/patch-src_util.c
T
Kurt Jaeger de0521e608 net-mgmt/pmacct: update 1.7.4p1 -> 1.7.5
- added REDIS option, pmacct daemons can now connect to a Redis cache
- fix SQLDOC pkg-plist substitute
- fixed SQL headers/libs detection

PR:		243455
Submitted by:	Juraj Lutter <juraj@lutter.sk>
Relnotes:	https://github.com/pmacct/pmacct/releases/tag/v1.7.5
2020-08-05 14:42:27 +00:00

23 lines
909 B
C

--- src/util.c.orig 2020-05-10 13:57:54 UTC
+++ src/util.c
@@ -1594,7 +1594,7 @@ void *pm_malloc(size_t size)
obj = (unsigned char *) malloc(size);
if (!obj) {
- Log(LOG_ERR, "ERROR ( %s/%s ): Unable to grab enough memory (requested: %lu bytes). Exiting ...\n",
+ Log(LOG_ERR, "ERROR ( %s/%s ): Unable to grab enough memory (requested: %zu bytes). Exiting ...\n",
config.name, config.type, size);
exit_gracefully(1);
}
@@ -2010,8 +2010,8 @@ void compose_timestamp(char *buf, int buflen, struct t
if (buflen < VERYSHORTBUFLEN) return;
if (since_epoch) {
- if (usec) snprintf(buf, buflen, "%ld.%.6ld", tv->tv_sec, (long)tv->tv_usec);
- else snprintf(buf, buflen, "%ld", tv->tv_sec);
+ if (usec) snprintf(buf, buflen, "%ld.%.6ld", (long)tv->tv_sec, (long)tv->tv_usec);
+ else snprintf(buf, buflen, "%ld", (long)tv->tv_sec);
}
else {
time1 = tv->tv_sec;