summaryrefslogtreecommitdiff
path: root/libs/binder/ProcessState.cpp
diff options
context:
space:
mode:
author Kevin Lindkvist <lindkvist@google.com> 2025-01-28 09:19:28 -0800
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2025-01-28 09:19:28 -0800
commitfcfe0409916dcd9b9b6bf66c7dda3446a994bc2e (patch)
tree837559914fccc608780266d517c8045d8c482e74 /libs/binder/ProcessState.cpp
parent4fc5a2befa6412030867528716467b5dc640dc6e (diff)
parent7317ccbb67388b9ec3e2f7af7814108f37eda703 (diff)
Merge "Enable compilation of libbinder on Fuchsia" into main am: 7317ccbb67
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3459704 Change-Id: I51e50af208dd711b3de47108aa2fbf50bf70a103 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs/binder/ProcessState.cpp')
-rw-r--r--libs/binder/ProcessState.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index 0e1e9b4127..0bec37999b 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -48,6 +48,10 @@
#define DEFAULT_MAX_BINDER_THREADS 15
#define DEFAULT_ENABLE_ONEWAY_SPAM_DETECTION 1
+#if defined(__ANDROID__) || defined(__Fuchsia__)
+#define EXPECT_BINDER_OPEN_SUCCESS
+#endif
+
#ifdef __ANDROID_VNDK__
const char* kDefaultDriver = "/dev/vndbinder";
#else
@@ -613,7 +617,7 @@ ProcessState::ProcessState(const char* driver)
}
}
-#ifdef __ANDROID__
+#if defined(EXPECT_BINDER_OPEN_SUCCESS)
LOG_ALWAYS_FATAL_IF(!opened.ok(),
"Binder driver '%s' could not be opened. Error: %s. Terminating.",
driver, error.c_str());