kumquat-buildroot/package/iperf/0002-fix-speed-display-in-csv-report.patch

40 lines
1.3 KiB
Diff
Raw Normal View History

From f035e70b72d4285dcdbd393e680777a927cb9da4 Mon Sep 17 00:00:00 2001
From: Matt Weber <matthew.weber@rockwellcollins.com>
Date: Thu, 28 Jul 2016 19:04:01 -0500
Subject: [PATCH] perf: fix "speed" display in csv report
Some parameters displayed in the CSV reports are declared
as uint64_t, but the printf format doesn't reflect this.
Submitted bug: https://sourceforge.net/p/iperf/bugs/66/
Signed-off-by: Matt Poduska <matt.poduska@rockwellcollins.com>
Signed-off-by: Atul Singh <atul.singh.mandla@gmail.com>
Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
---
src/Locale.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/Locale.c b/src/Locale.c
index b5d42b1..7b924fa 100644
--- a/src/Locale.c
+++ b/src/Locale.c
@@ -260,11 +260,12 @@ const char reportCSV_bw_format[] =
const char reportCSV_bw_jitter_loss_format[] =
"%s,%s,%d,%.1f-%.1f,%I64d,%I64d,%.3f,%d,%d,%.3f,%d\n";
#else
+#include "inttypes.h"
const char reportCSV_bw_format[] =
-"%s,%s,%d,%.1f-%.1f,%d,%d\n";
+"%s,%s,%d,%.1f-%.1f,%" PRId64 ",%" PRId64 "\n";
const char reportCSV_bw_jitter_loss_format[] =
-"%s,%s,%d,%.1f-%.1f,%d,%d,%.3f,%d,%d,%.3f,%d\n";
+"%s,%s,%d,%.1f-%.1f,%" PRId64 ",%" PRId64 ",%.3f,%d,%d,%.3f,%d\n";
#endif //WIN32
#endif //HAVE_QUAD_SUPPORT
/* -------------------------------------------------------------------
--
1.9.1