From 67239befe0a1e3881261247edaf6e99352664233 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Sat, 24 Jul 2021 19:43:26 +0300
Subject: [PATCH] Second attempt at fixing guicast/thread.h on non-android

---
 cinelerra-5.1/guicast/thread.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/cinelerra-5.1/guicast/thread.h b/cinelerra-5.1/guicast/thread.h
index e701a8f4..0d71afb4 100644
--- a/cinelerra-5.1/guicast/thread.h
+++ b/cinelerra-5.1/guicast/thread.h
@@ -26,18 +26,20 @@
 #include <pthread.h>
 #include <unistd.h>
 
+#if !defined(__TERMUX__)
+
 #ifndef NO_TID
 #include <sys/syscall.h>
 
-#if !defined(__TERMUX__)
 // glibc >= 2.30 provides gettid() in unistd
 #if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 30)
 static inline int gettid() { return syscall(SYS_gettid, 0, 0, 0); }
+#endif
 #else
 static inline long gettid() { return (long)pthread_self(); }
 #endif
-#endif // TERMUX
-#endif //no_tid
+
+#endif
 
 // The thread does not autodelete by default.
 // If autodelete is 1 the thread autodeletes.
-- 
2.32.0

