From aeed1d4043338e4a9888c10f3078d7557af9dbcd Mon Sep 17 00:00:00 2001 From: Raul Almeida Date: Tue, 24 Sep 2013 17:03:36 -0300 Subject: [PATCH 1/2] Update zm_timer.h As proposed on https://github.com/ZoneMinder/ZoneMinder/issues/170 --- src/zm_timer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/zm_timer.h b/src/zm_timer.h index f1aa54706..ed6bf5b36 100644 --- a/src/zm_timer.h +++ b/src/zm_timer.h @@ -20,6 +20,7 @@ #ifndef ZM_TIMER_H #define ZM_TIMER_H +#include #include "zm_thread.h" #include "zm_exception.h" @@ -30,7 +31,7 @@ private: class TimerException : public Exception { public: - TimerException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(224) ) ) + TimerException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(SYS_gettid) ) ) { } }; From f2225f23cdc3dc0e53423b892ed6c54fba815abc Mon Sep 17 00:00:00 2001 From: Raul Almeida Date: Tue, 24 Sep 2013 17:07:36 -0300 Subject: [PATCH 2/2] Update zm_thread.h As proposed on https://github.com/ZoneMinder/ZoneMinder/issues/170 --- src/zm_thread.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/zm_thread.h b/src/zm_thread.h index 5a635298c..c9bb37c83 100644 --- a/src/zm_thread.h +++ b/src/zm_thread.h @@ -23,13 +23,14 @@ #include #include #include +#include #include "zm_exception.h" #include "zm_utils.h" class ThreadException : public Exception { public: - ThreadException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(224) ) ) + ThreadException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(SYS_gettid) ) ) { } }; @@ -202,7 +203,7 @@ protected: pid_t id() const { - return( (pid_t)syscall(224) ); + return( (pid_t)syscall(SYS_gettid) ); } void exit( int status = 0 ) {