void-packages/srcpkgs/gnome-nettool/patches/printf.patch

33 lines
1.3 KiB
Diff

--- src/info.c 2013-05-02 13:58:40.000000000 +0200
+++ src/info.c 2013-05-03 05:20:04.684921458 +0200
@@ -232,13 +232,13 @@
text_rx_bytes = util_legible_bytes (netload.bytes_in);
text_tx_bytes = util_legible_bytes (netload.bytes_out);
- g_sprintf (rx_pkt, "%lld", netload.packets_in);
- g_sprintf (tx_pkt, "%lld", netload.packets_out);
+ g_sprintf (rx_pkt, "%" G_GUINT64_FORMAT, netload.packets_in);
+ g_sprintf (tx_pkt, "%" G_GUINT64_FORMAT, netload.packets_out);
- g_sprintf (rx_error, "%lld", netload.errors_in);
- g_sprintf (tx_error, "%lld", netload.errors_out);
+ g_sprintf (rx_error, "%" G_GUINT64_FORMAT, netload.errors_in);
+ g_sprintf (tx_error, "%" G_GUINT64_FORMAT, netload.errors_out);
- g_sprintf (collisions, "%lld", netload.collisions);
+ g_sprintf (collisions, "%" G_GUINT64_FORMAT, netload.collisions);
gtk_label_set_text (GTK_LABEL (info->tx_bytes), text_tx_bytes);
gtk_label_set_text (GTK_LABEL (info->tx), tx_pkt);
--- src/utils.c 2013-05-02 13:58:40.000000000 +0200
+++ src/utils.c 2013-05-03 05:21:45.704202804 +0200
@@ -272,7 +272,7 @@
unit = "KiB";
}
- result = g_strdup_printf ("%lld.%lld %s", short_rx / 10,
+ result = g_strdup_printf ("%" G_GUINT64_FORMAT ".%" G_GUINT64_FORMAT " %s", short_rx / 10,
short_rx % 10, unit);
return result;
}