diff --git a/src/threads.h b/src/threads.h index 0a843b7ff0..213b064243 100644 --- a/src/threads.h +++ b/src/threads.h @@ -243,6 +243,14 @@ enum { u_long tid = (u_long)tpid; \ tid; \ }) +#elif defined(sun) +#include +#define SCGetThreadIdLong(...) ({ \ + thread_t tmpthid = thr_self(); \ + u_long tid = (u_long)tmpthid; \ + tid; \ +}) + #else #define SCGetThreadIdLong(...) ({ \ pid_t tmpthid; \