diff --git a/core/AmSession.cpp b/core/AmSession.cpp index 57339ff4..e25caafe 100644 --- a/core/AmSession.cpp +++ b/core/AmSession.cpp @@ -425,7 +425,7 @@ string AmSession::getNewId() id += int2hex(get_random()) + "-"; id += int2hex(t.tv_sec) + int2hex(t.tv_usec) + "-"; - id += int2hex((unsigned int) pthread_self()); + id += int2hex((unsigned int)((unsigned long)pthread_self())); return id; } diff --git a/core/AmThread.cpp b/core/AmThread.cpp index ccb1eb61..98cac9d4 100644 --- a/core/AmThread.cpp +++ b/core/AmThread.cpp @@ -64,12 +64,12 @@ AmThread::AmThread() void * AmThread::_start(void * _t) { AmThread* _this = (AmThread*)_t; - _this->_pid = (pid_t) _this->_td; - DBG("Thread %lu is starting.\n", (unsigned long int) _this->_pid); + _this->_pid = (unsigned long) _this->_td; + DBG("Thread %lu is starting.\n", (unsigned long) _this->_pid); _this->_stopped.set(false); _this->run(); - DBG("Thread %lu is ending.\n", (unsigned long int) _this->_pid); + DBG("Thread %lu is ending.\n", (unsigned long) _this->_pid); _this->_stopped.set(true); //thread_nr_mut.lock(); diff --git a/core/AmThread.h b/core/AmThread.h index 18045334..410ce718 100644 --- a/core/AmThread.h +++ b/core/AmThread.h @@ -170,7 +170,7 @@ protected: virtual void on_stop()=0; public: - pid_t _pid; + unsigned long _pid; AmThread(); virtual ~AmThread() {}