mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-10 04:43:32 +00:00
packages/aapt
This commit is contained in:
56
packages/aapt/libutils-Threads.cpp.patch
Normal file
56
packages/aapt/libutils-Threads.cpp.patch
Normal file
@@ -0,0 +1,56 @@
|
||||
--- a/core/libutils/Threads.cpp
|
||||
+++ b/core/libutils/Threads.cpp
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include <utils/Log.h>
|
||||
|
||||
-#if defined(__ANDROID__)
|
||||
+#if defined(__ANDROID__) && !defined(__TERMUX__)
|
||||
#include <processgroup/processgroup.h>
|
||||
#include <processgroup/sched_policy.h>
|
||||
#endif
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
typedef void* (*android_pthread_entry)(void*);
|
||||
|
||||
-#if defined(__ANDROID__)
|
||||
+#if defined(__ANDROID__) && !defined(__TERMUX__)
|
||||
struct thread_data_t {
|
||||
thread_func_t entryFunction;
|
||||
void* userData;
|
||||
@@ -131,7 +131,7 @@
|
||||
pthread_attr_init(&attr);
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
|
||||
-#if defined(__ANDROID__) /* valgrind is rejecting RT-priority create reqs */
|
||||
+#if defined(__ANDROID__) && !defined(__TERMUX__) /* valgrind is rejecting RT-priority create reqs */
|
||||
if (threadPriority != PRIORITY_DEFAULT || threadName != NULL) {
|
||||
// Now that the pthread_t has a method to find the associated
|
||||
// android_thread_id_t (pid) from pthread_t, it would be possible to avoid
|
||||
@@ -175,7 +175,7 @@
|
||||
return 1;
|
||||
}
|
||||
|
||||
-#if defined(__ANDROID__)
|
||||
+#if defined(__ANDROID__) && !defined(__TERMUX__)
|
||||
static pthread_t android_thread_id_t_to_pthread(android_thread_id_t thread)
|
||||
{
|
||||
return (pthread_t) thread;
|
||||
@@ -301,7 +301,7 @@
|
||||
gCreateThreadFn = func;
|
||||
}
|
||||
|
||||
-#if defined(__ANDROID__)
|
||||
+#if defined(__ANDROID__) && !defined(__TERMUX__)
|
||||
int androidSetThreadPriority(pid_t tid, int pri)
|
||||
{
|
||||
int rc = 0;
|
||||
@@ -843,7 +843,7 @@
|
||||
return mRunning;
|
||||
}
|
||||
|
||||
-#if defined(__ANDROID__)
|
||||
+#if defined(__ANDROID__) && !defined(__TERMUX__)
|
||||
pid_t Thread::getTid() const
|
||||
{
|
||||
// mTid is not defined until the child initializes it, and the caller may need it earlier
|
||||
Reference in New Issue
Block a user