From c628c6d22a10a31b929146c290b4d7f6ab4cee8a Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Sat, 24 Jul 2021 19:07:27 +0300
Subject: [PATCH] Attempt at fixing guicast/thread.h for non-android

---
 cinelerra-5.1/guicast/thread.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cinelerra-5.1/guicast/thread.h b/cinelerra-5.1/guicast/thread.h
index e701a8f4..7d64b387 100644
--- a/cinelerra-5.1/guicast/thread.h
+++ b/cinelerra-5.1/guicast/thread.h
@@ -26,17 +26,19 @@
 #include <pthread.h>
 #include <unistd.h>
 
+#if defined(__TERMUX__)
+#define NO_TID
+#endif
+
 #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); }
 #else
 static inline long gettid() { return (long)pthread_self(); }
 #endif
-#endif // TERMUX
 #endif //no_tid
 
 // The thread does not autodelete by default.
-- 
2.32.0

