#include <pthread.h>
#include <unistd.h>
+#if !defined(__TERMUX__)
+
#ifndef NO_TID
#include <sys/syscall.h>
static inline long gettid() { return (long)pthread_self(); }
#endif
+#endif
+
// The thread does not autodelete by default.
// If autodelete is 1 the thread autodeletes.
// If it's synchronous the deletion occurs in join().