From: Michael Jeanson Date: Tue, 11 Jul 2017 16:40:56 +0000 (-0400) Subject: Port: Add Solaris tid support to logging X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=c0c0c8b462770508bc3446053e84365e808e6303;p=deliverable%2Fbabeltrace.git 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 e31f867e1..456101298 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__)