termux-packages/packages/aapt/libutils-misc.cpp.patch

30 lines
1.2 KiB
Diff
Raw Normal View History

2022-02-05 06:17:26 +01:00
--- a/core/libutils/misc.cpp
+++ b/core/libutils/misc.cpp
@@ -23,7 +23,7 @@
#include <utils/Log.h>
#include <utils/Vector.h>
2022-02-06 13:20:18 +01:00
-#if defined(__ANDROID__) && !defined(__ANDROID_RECOVERY__)
+#if defined(__ANDROID__) && !defined(__TERMUX__) && !defined(__ANDROID_RECOVERY__)
2022-02-05 06:17:26 +01:00
#include <dlfcn.h>
#include <vndksupport/linker.h>
#endif
2022-02-06 13:20:18 +01:00
@@ -70,7 +70,7 @@
void add_sysprop_change_callback(sysprop_change_callback, int) {}
2022-02-05 06:17:26 +01:00
#endif
2022-02-06 13:20:18 +01:00
-#if defined(__ANDROID__) && !defined(__ANDROID_RECOVERY__)
+#if defined(__ANDROID__) && !defined(__TERMUX__) && !defined(__ANDROID_RECOVERY__)
2022-02-05 06:17:26 +01:00
void (*get_report_sysprop_change_func())() {
void (*func)() = nullptr;
void* handle = android_load_sphal_library("libutils.so", RTLD_NOW);
2022-02-06 13:20:18 +01:00
@@ -85,7 +85,7 @@
2022-02-05 06:17:26 +01:00
void report_sysprop_change() {
do_report_sysprop_change();
2022-02-06 13:20:18 +01:00
-#if defined(__ANDROID__) && !defined(__ANDROID_RECOVERY__)
+#if defined(__ANDROID__) && !defined(__TERMUX__) && !defined(__ANDROID_RECOVERY__)
2022-02-05 06:17:26 +01:00
// libutils.so is double loaded; from the default namespace and from the
// 'sphal' namespace. Redirect the sysprop change event to the other instance
// of libutils.so loaded in the 'sphal' namespace so that listeners attached