libbinder: on host
The usecase is unit testing things which implement binder interfaces.
Bug: 124524556
Test: TH runs all relevant unit tests
Change-Id: I8caba1290da6d0354a7736a26d1dad7b6ab852e6
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index ed6c834..ee26997 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -67,7 +67,7 @@
#define PAD_SIZE_UNSAFE(s) (((s)+3)&~3)
static size_t pad_size(size_t s) {
- if (s > (SIZE_T_MAX - 3)) {
+ if (s > (std::numeric_limits<size_t>::max() - 3)) {
abort();
}
return PAD_SIZE_UNSAFE(s);