Blob Blame History Raw
commit 69244a5e0d9dfec3ef534b19b89a541576bb17dc
Author: Ingo Franzki <ifranzki@linux.ibm.com>
Date:   Tue Feb 9 10:47:57 2021 +0100

    TRACE: Use gettid() if SYS_gettid is not defined
    
    Also print the thread ID in the trace, if SYS_gettid is not defined.
    
    Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>

diff --git a/usr/lib/common/trace.c b/usr/lib/common/trace.c
index 678c0b96..bdc5256a 100644
--- a/usr/lib/common/trace.c
+++ b/usr/lib/common/trace.c
@@ -33,6 +33,8 @@
 
 #ifdef SYS_gettid
 #define __gettid() syscall(SYS_gettid)
+#else
+#define __gettid() gettid()
 #endif
 
 pthread_mutex_t tlmtx = PTHREAD_MUTEX_INITIALIZER;