Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thrift: Fix build failure that stdlib and boost both define uint64_t #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions packages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
<patches>
<patch strip="2">thrift_patch1.diff</patch>
<patch strip="2">thrift_autoconf.patch</patch>
<patch strip="2">thrift_uint64t.patch</patch>
</patches>
<format>tgz</format>
<md5>d29dfcd38d476cbc420b6f4d80ab966c</md5>
Expand Down
50 changes: 50 additions & 0 deletions thrift_uint64t.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
diff -crN a/third_party/thrift-0.8.0/lib/cpp/src/transport/TSSLSocket.cpp b/third_party/thrift-0.8.0/lib/cpp/src/transport/TSSLSocket.cpp
*** a/third_party/thrift-0.8.0/lib/cpp/src/transport/TSSLSocket.cpp 2011-11-26 19:00:41.000000000 +0000
--- b/third_party/thrift-0.8.0/lib/cpp/src/transport/TSSLSocket.cpp 2014-07-03 06:02:08.187901128 +0000
***************
*** 347,353 ****

// TSSLSocketFactory implementation
bool TSSLSocketFactory::initialized = false;
! uint64_t TSSLSocketFactory::count_ = 0;
Mutex TSSLSocketFactory::mutex_;

TSSLSocketFactory::TSSLSocketFactory(): server_(false) {
--- 347,353 ----

// TSSLSocketFactory implementation
bool TSSLSocketFactory::initialized = false;
! boost::uint64_t TSSLSocketFactory::count_ = 0;
Mutex TSSLSocketFactory::mutex_;

TSSLSocketFactory::TSSLSocketFactory(): server_(false) {
diff -crN a/third_party/thrift-0.8.0/lib/cpp/src/transport/TSSLSocket.h b/third_party/thrift-0.8.0/lib/cpp/src/transport/TSSLSocket.h
*** a/third_party/thrift-0.8.0/lib/cpp/src/transport/TSSLSocket.h 2011-11-26 19:00:41.000000000 +0000
--- b/third_party/thrift-0.8.0/lib/cpp/src/transport/TSSLSocket.h 2014-07-03 06:02:41.030816551 +0000
***************
*** 21,26 ****
--- 21,27 ----
#define _THRIFT_TRANSPORT_TSSLSOCKET_H_ 1

#include <string>
+ #include <boost/cstdint.hpp>
#include <boost/shared_ptr.hpp>
#include <openssl/ssl.h>
#include "concurrency/Mutex.h"
***************
*** 207,213 ****
boost::shared_ptr<AccessManager> access_;
static bool initialized;
static concurrency::Mutex mutex_;
! static uint64_t count_;
void setup(boost::shared_ptr<TSSLSocket> ssl);
static int passwordCallback(char* password, int size, int, void* data);
};
--- 208,214 ----
boost::shared_ptr<AccessManager> access_;
static bool initialized;
static concurrency::Mutex mutex_;
! static boost::uint64_t count_;
void setup(boost::shared_ptr<TSSLSocket> ssl);
static int passwordCallback(char* password, int size, int, void* data);
};