Port: Add Solaris tid support to logging
[babeltrace.git] / logging / log.c
index e31f867e13872c79aca8eda145b0ac023932e4c0..4561012984e75eb6548a78573e4d597683c1a305 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <babeltrace/babeltrace-internal.h>
 #include <babeltrace/common-internal.h>
+#include <pthread.h>
 
 #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__)
This page took 0.023591 seconds and 4 git commands to generate.