summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/test_multiplexer.cc9
1 files changed, 8 insertions, 1 deletions
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;
}