From db1877e6fd34740620743197beef9ec67cb3b415 Mon Sep 17 00:00:00 2001
From: Bent Bisballe Nyeng <deva@aasimon.org>
Date: Wed, 28 May 2014 11:18:22 +0200
Subject: Fix sprintf of uint64_t.

---
 test/test_multiplexer.cc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'test')

diff --git a/test/test_multiplexer.cc b/test/test_multiplexer.cc
index d431707..7eec468 100644
--- a/test/test_multiplexer.cc
+++ b/test/test_multiplexer.cc
@@ -61,7 +61,14 @@ std::string bin2str(uint64_t i)
 {
   char test[32];
   i = htonll(i);
-  sprintf(test, "%016llX", i);
+  if(sizeof(long long) == 8) {
+    sprintf(test, "%016llX", (unsigned long long)i);
+  } else if(sizeof(long) == 8) {
+    sprintf(test, "%016lX", (unsigned long)i);
+  } else {
+    sprintf(test, "?????");
+  }
+
   return test;
 }
 
-- 
cgit v1.2.3