THRIFT-1585 C++ library fails to build with OS X pthread implementation
authorRoger Meier <roger@apache.org>
Wed, 23 May 2012 19:17:20 +0000 (19:17 +0000)
committerRoger Meier <roger@apache.org>
Wed, 23 May 2012 19:17:20 +0000 (19:17 +0000)
Patch: David Nadlinger

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1341990 13f79535-47bb-0310-9956-ffa450edef68

lib/cpp/src/thrift/concurrency/Thread.h [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index dc3c748..164df0c
@@ -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() {};