From 2f40cd5b595945f73809114cb75ad593aa96b782 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Mon, 17 Aug 2015 07:36:57 +0200 Subject: [PATCH] With ptrhead, Thread::currentTid() returns a pointer to a struct which leads to a compile error when assigning it to an long. Thus _ostid type should be changed to IntPtr and the assignment should use a reinterpret_cast. Signed-off-by: FrancisANDRE --- Foundation/include/Poco/Message.h | 4 ++-- Foundation/src/Message.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Foundation/include/Poco/Message.h b/Foundation/include/Poco/Message.h index 21cccbfdb..777eb04c7 100644 --- a/Foundation/include/Poco/Message.h +++ b/Foundation/include/Poco/Message.h @@ -199,7 +199,7 @@ private: Priority _prio; Timestamp _time; int _tid; - int _ostid; + IntPtr _ostid; std::string _thread; long _pid; const char* _file; @@ -247,7 +247,7 @@ inline long Message::getTid() const } -inline long Message::getOsTid() const +inline IntPtr Message::getOsTid() const { return _ostid; } diff --git a/Foundation/src/Message.cpp b/Foundation/src/Message.cpp index 2b336ccf6..8a87588af 100644 --- a/Foundation/src/Message.cpp +++ b/Foundation/src/Message.cpp @@ -118,7 +118,7 @@ void Message::init() #if !defined(POCO_VXWORKS) _pid = Process::id(); #endif - _ostid = Thread::currentTid(); + _ostid = reinterpret_cast(Thread::currentTid()); Thread* pThread = Thread::current(); if (pThread) {