pkgsrc/sysutils/gkrellm/patches/patch-ar
2006-03-19 22:10:38 +00:00

49 lines
1.8 KiB
Text

$NetBSD: patch-ar,v 1.3 2006/03/19 22:10:38 joerg Exp $
--- server/monitor.c.orig 2005-05-24 04:29:32.000000000 +0000
+++ server/monitor.c
@@ -21,7 +21,7 @@
#include "gkrellmd.h"
#include "gkrellmd-private.h"
-
+#include <inttypes.h>
GList *gkrellmd_monitor_list;
@@ -555,14 +555,14 @@ serve_disk_data(GkrellmdMonitor *mon, gb
if (!disk->subdisk_parent)
{
if (gkrellmd_check_client_version(mon, 2, 2, 7) && disk->virtual)
- snprintf(buf, sizeof(buf), "%s virtual %llu %llu\n",
+ snprintf(buf, sizeof(buf), "%s virtual %" PRIu64 " %" PRIu64 "\n",
disk->name, disk->rb, disk->wb);
else
- snprintf(buf, sizeof(buf), "%s %llu %llu\n",
+ snprintf(buf, sizeof(buf), "%s %" PRIu64 " %" PRIu64 "\n",
disk->name, disk->rb, disk->wb);
}
else if (mon->privat->client->feature_subdisk)
- snprintf(buf, sizeof(buf), "%s %s %llu %llu\n",
+ snprintf(buf, sizeof(buf), "%s %s %" PRIu64 " %" PRIu64 "\n",
disk->name, disk->subdisk_parent, disk->rb, disk->wb);
else
continue;
@@ -1233,7 +1233,7 @@ serve_mem_data(GkrellmdMonitor *mon, gbo
if (mem.mem_changed || first_serve)
{
gkrellmd_set_serve_name(mon, "mem");
- snprintf(buf, sizeof(buf), "%llu %llu %llu %llu %llu %llu\n",
+ snprintf(buf, sizeof(buf), "%" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64 "\n",
mem.total, mem.used, mem.free,
mem.shared, mem.buffers, mem.cached);
gkrellmd_serve_data(mon, buf);
@@ -1242,7 +1242,7 @@ serve_mem_data(GkrellmdMonitor *mon, gbo
if (mem.swap_changed || first_serve)
{
gkrellmd_set_serve_name(mon, "swap");
- snprintf(buf, sizeof(buf), "%llu %llu %lu %lu\n",
+ snprintf(buf, sizeof(buf), "%" PRIu64 " %" PRIu64 " %lu %lu\n",
mem.swap_total, mem.swap_used,
mem.swap_in, mem.swap_out);
gkrellmd_serve_data(mon, buf);