From: Roger Meier Date: Wed, 23 May 2012 19:17:20 +0000 (+0000) Subject: THRIFT-1585 C++ library fails to build with OS X pthread implementation X-Git-Tag: 0.9.1~354 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=b6617836d4bd1ff4788bd63eea4cec1378d14c3b;p=common%2Fthrift.git THRIFT-1585 C++ library fails to build with OS X pthread implementation Patch: David Nadlinger git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1341990 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/cpp/src/thrift/concurrency/Thread.h b/lib/cpp/src/thrift/concurrency/Thread.h old mode 100644 new mode 100755 index dc3c7486..164df0cb --- a/lib/cpp/src/thrift/concurrency/Thread.h +++ b/lib/cpp/src/thrift/concurrency/Thread.h @@ -86,9 +86,9 @@ class Thread { static inline bool is_current(id_t t) { return t == boost::this_thread::get_id(); } static inline id_t get_current() { return boost::this_thread::get_id(); } #else - typedef uint64_t id_t; - static inline bool is_current(pthread_t t) { return pthread_equal(pthread_self(), t); } - static inline id_t get_current() { return (Thread::id_t)pthread_self(); } + typedef pthread_t id_t; + static inline bool is_current(id_t t) { return pthread_equal(pthread_self(), t); } + static inline id_t get_current() { return pthread_self(); } #endif virtual ~Thread() {};