From: Michael Jeanson Date: Tue, 11 Jul 2017 16:40:56 +0000 (-0400) Subject: Port: Add Solaris tid support to logging X-Git-Tag: v2.0.0-pre4~210 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=630c90a183f1a5f4e47647e0592ac4a034668102 Port: Add Solaris tid support to logging Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/logging/log.c b/logging/log.c index e31f867e..45610129 100644 --- a/logging/log.c +++ b/logging/log.c @@ -6,6 +6,7 @@ #include #include +#include #ifdef __CYGWIN__ extern unsigned long pthread_getsequence_np(pthread_t *); @@ -830,6 +831,8 @@ static void pid_callback(int *const pid, int *const tid) #elif defined(__CYGWIN__) pthread_t thr = pthread_self(); *tid = (int)pthread_getsequence_np(&thr); + #elif defined(__sun__) + *tid = (int)pthread_self(); #elif defined(__ANDROID__) *tid = gettid(); #elif defined(__linux__)