blob: 0a406f784d192420f741357f5ef90763d9cc6887 [file] [log] [blame]
diff --git a/src/libunwindstack/LogAndroid.cpp b/src/libunwindstack/LogAndroid.cpp
index a2bfc39..bb8fdaf 100644
--- a/src/libunwindstack/LogAndroid.cpp
+++ b/src/libunwindstack/LogAndroid.cpp
@@ -23,7 +23,7 @@
#define LOG_TAG "unwind"
#include <log/log.h>
-#if defined(__BIONIC__)
+#if defined(__BIONIC__) && !defined(__ANDROID_NDK__)
#include <async_safe/log.h>
#endif
#include <android-base/stringprintf.h>
@@ -66,7 +66,7 @@ void Error(const char* format, ...) {
va_end(args);
}
-#if defined(__BIONIC__)
+#if defined(__BIONIC__) && !defined(__ANDROID_NDK__)
void AsyncSafe(const char* format, ...) {
va_list args;
va_start(args, format);
diff --git a/src/libunwindstack/MemoryMte.cpp b/src/libunwindstack/MemoryMte.cpp
index 3841744..681aea6 100644
--- a/src/libunwindstack/MemoryMte.cpp
+++ b/src/libunwindstack/MemoryMte.cpp
@@ -17,7 +17,7 @@
#include <sys/ptrace.h>
#include <sys/uio.h>
-#if defined(__BIONIC__)
+#if defined(__BIONIC__) && !defined(__ANDROID_NDK__)
#include <bionic/mte.h>
#else
#define mte_supported() false
diff --git a/src/libunwindstack/RegsArm64.cpp b/src/libunwindstack/RegsArm64.cpp
index 99eddb0..05a1809 100644
--- a/src/libunwindstack/RegsArm64.cpp
+++ b/src/libunwindstack/RegsArm64.cpp
@@ -19,7 +19,7 @@
#include <functional>
-#if defined(__BIONIC__)
+#if defined(__BIONIC__) && !defined(__ANDROID_NDK__)
#include <bionic/pac.h>
#endif
@@ -60,7 +60,7 @@ static uint64_t strip_pac(uint64_t pc, uint64_t mask) {
if (mask) {
pc &= ~mask;
} else {
-#if defined(__BIONIC__)
+#if defined(__BIONIC__) && !defined(__ANDROID_NDK__)
pc = __bionic_clear_pac_bits(pc);
#endif
}