THRIFT-1325 Thrift SVN and latest GCC issue: Undefined symbols: "apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>::VERSION_MASK"
Patch: Brandon Arp
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1211842 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/protocol/TBinaryProtocol.h b/lib/cpp/src/protocol/TBinaryProtocol.h
index edb8834..37d33f4 100644
--- a/lib/cpp/src/protocol/TBinaryProtocol.h
+++ b/lib/cpp/src/protocol/TBinaryProtocol.h
@@ -36,8 +36,8 @@
class TBinaryProtocolT
: public TVirtualProtocol< TBinaryProtocolT<Transport_> > {
protected:
- static const int32_t VERSION_MASK = 0xffff0000;
- static const int32_t VERSION_1 = 0x80010000;
+ static const int32_t VERSION_MASK = ((int32_t)0xffff0000);
+ static const int32_t VERSION_1 = ((int32_t)0x80010000);
// VERSION_2 (0x80020000) is taken by TDenseProtocol.
public:
diff --git a/lib/cpp/src/protocol/TDenseProtocol.h b/lib/cpp/src/protocol/TDenseProtocol.h
index 438ed89..fc25cb7 100644
--- a/lib/cpp/src/protocol/TDenseProtocol.h
+++ b/lib/cpp/src/protocol/TDenseProtocol.h
@@ -59,9 +59,9 @@
class TDenseProtocol
: public TVirtualProtocol<TDenseProtocol, TBinaryProtocol> {
protected:
- static const int32_t VERSION_MASK = 0xffff0000;
+ static const int32_t VERSION_MASK = ((int32_t)0xffff0000);
// VERSION_1 (0x80010000) is taken by TBinaryProtocol.
- static const int32_t VERSION_2 = 0x80020000;
+ static const int32_t VERSION_2 = ((int32_t)0x80020000);
public:
typedef apache::thrift::reflection::local::TypeSpec TypeSpec;