From e8e12433e1f7628904311347f9aeb455c2cb0a4f Mon Sep 17 00:00:00 2001 From: Kevin Lindkvist Date: Wed, 23 Nov 2022 13:23:42 +0100 Subject: Enable compilation of libbinder on Fuchsia This ensures that getMinSchedulerPolicy and getMinSchedulerPriority are only called on Linux as they are only defined here. This replaces some __ANDROID__ ifdef's with BINDER_WITH_KERNEL_IPC. Change-Id: Idec83bf1715ac3c62ac7a849aa188aa491a19fda --- libs/binder/ProcessState.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libs/binder/ProcessState.cpp') 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()); -- cgit v1.2.3-59-g8ed1b