summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2022-12-07 04:47:05 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-12-07 04:47:05 +0000
commitfd98ecbb802e9c3a6344a88fdf2e0d8457b4390c (patch)
treef7804951583c91fa8e67a39ea075acfe66b53e79
parent688ecb16683e71dddbb29bf11b9296cdd27919ee (diff)
parenta8ee5dca256ce07090e9b94988bd021921c0d0b8 (diff)
Merge "libbinder: Fix __assert macro in Trusty" am: 7e560fe534 am: a8ee5dca25
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2321918 Change-Id: I09ed060b60ec9147baef52b4ae852f777eb2c3e4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--libs/binder/trusty/include/log/log.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/binder/trusty/include/log/log.h b/libs/binder/trusty/include/log/log.h
index d88d18a7be..de84617343 100644
--- a/libs/binder/trusty/include/log/log.h
+++ b/libs/binder/trusty/include/log/log.h
@@ -121,6 +121,8 @@ static inline void __ignore_va_args__(...) {}
TLOGE("android_errorWriteLog: tag:%x subTag:%s\n", tag, subTag); \
} while (0)
-extern "C" inline void __assert(const char* file, int line, const char* str) {
- LOG_ALWAYS_FATAL("%s:%d: assertion \"%s\" failed", file, line, str);
-}
+// Override the definition of __assert from binder_status.h
+#ifndef __BIONIC__
+#undef __assert
+#define __assert(file, line, str) LOG_ALWAYS_FATAL("%s:%d: %s", file, line, str)
+#endif // __BIONIC__