From 630c90a183f1a5f4e47647e0592ac4a034668102 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Tue, 11 Jul 2017 12:40:56 -0400 Subject: [PATCH] Port: Add Solaris tid support to logging MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- logging/log.c | 3 +++ 1 file changed, 3 insertions(+) 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__) -- 2.34.1