From f2b094f1f1a331c9bd92c6106683fbaa7191dc66 Mon Sep 17 00:00:00 2001 From: Roger Meier Date: Tue, 4 Jun 2013 22:09:37 +0200 Subject: [PATCH] THRIFT-1983 %z printf format is not available in Visual Patch: Konrad Grochowski --- lib/cpp/src/thrift/server/TNonblockingServer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/cpp/src/thrift/server/TNonblockingServer.cpp b/lib/cpp/src/thrift/server/TNonblockingServer.cpp index 641f7145..69f0e555 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 @@ void TNonblockingServer::TConnection::workSocket() { // 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; -- 2.17.1