From 3a96adb3aa6b9e0fd92851dd1aa63bd622b1eae9 Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <vital.had@gmail.com>
Date: Wed, 24 Jan 2024 07:00:24 +0800
Subject: [PATCH] pthread_threadid_np: expose on PowerPC

---
 pthreads/pthread.c | 2 --
 pthreads/pthread.h | 2 --
 2 files changed, 4 deletions(-)

diff --git pthreads/pthread.c pthreads/pthread.c
index 5e9aefb..65293fa 100644
--- Libc-594.9.5/pthreads/pthread.c
+++ Libc-594.9.5/pthreads/pthread.c
@@ -1118,7 +1118,6 @@ pthread_main_np(void)
 }
 
 
-#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
 /* if we are passed in a pthread_t that is NULL, then we return
    the current thread's thread_id. So folks don't have to call
    pthread_self, in addition to us doing it, if they just want 
@@ -1146,7 +1145,6 @@ pthread_threadid_np(pthread_t thread, __uint64_t *thread_id)
 	UNLOCK(_pthread_list_lock);
 	return rval;
 }
-#endif
 
 int
 pthread_getname_np(pthread_t thread, char *threadname, size_t len)
diff --git pthreads/pthread.h pthreads/pthread.h
index be3bb91..9a16a72 100644
--- Libc-594.9.5/pthreads/pthread.h
+++ Libc-594.9.5/pthreads/pthread.h
@@ -472,9 +472,7 @@ void      pthread_testcancel(void) __DARWIN_ALIAS(pthread_testcancel);
 /* returns non-zero if pthread_create or cthread_fork have been called */
 int		pthread_is_threaded_np(void);
 
-#if defined(__i386__) || defined(__x86_64__)
 int		pthread_threadid_np(pthread_t,__uint64_t*);
-#endif
 
 /*SPI to set and get pthread name*/
 int		pthread_getname_np(pthread_t,char*,size_t);
