THRIFT-1983 %z printf format is not available in Visual
Patch: Konrad Grochowski
diff --git a/lib/cpp/src/thrift/server/TNonblockingServer.cpp b/lib/cpp/src/thrift/server/TNonblockingServer.cpp
index 641f714..69f0e55 100644
--- a/lib/cpp/src/thrift/server/TNonblockingServer.cpp
+++ b/lib/cpp/src/thrift/server/TNonblockingServer.cpp
@@ -64,6 +64,7 @@
#ifdef _MSC_VER
#define PRIu32 "I32u"
+#define PRIu64 "I64u"
#endif
namespace apache { namespace thrift { namespace server {
@@ -478,9 +479,10 @@
// Don't allow giant frame sizes. This prevents bad clients from
// causing us to try and allocate a giant buffer.
GlobalOutput.printf("TNonblockingServer: frame size too large "
- "(%"PRIu32" > %zu) from client %s. remote side not "
- "using TFramedTransport?",
- readWant_, server_->getMaxFrameSize(),
+ "(%"PRIu32" > %"PRIu64") from client %s. "
+ "Remote side not using TFramedTransport?",
+ readWant_,
+ (uint64_t)server_->getMaxFrameSize(),
tSocket_->getSocketInfo().c_str());
close();
return;