Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dbf6dd5a authored by Steven Moreland's avatar Steven Moreland
Browse files

libbinder_ndk: clearer error on host misconfigured

libbinder_ndk uses defaults libbinder_ndk_host_user in order to work
on host w/o bionic. Currently, if you try to use libbinder_ndk on host
without libbinder_ndk, you'll get many errors like "use of undeclared
identifier". Now the first error will be:

 In file included from frameworks/native/libs/binder/ndk/include_ndk/android/binder_auto_utils.h:29:
 frameworks/native/libs/binder/ndk/include_ndk/android/binder_ibinder.h:39:2: error: Android builds must be compiled against a specific API. If this is an android platform host build, you must use libbinder_ndk_host_user.
 #error Android builds must be compiled against a specific API. If this is an \

Bug: N/A
Test: above
Change-Id: I99de02858137ed3af149694fb7224fdf88c0df26
parent b5667012
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -34,6 +34,12 @@
#include <android/binder_status.h>
#include <android/binder_status.h>


__BEGIN_DECLS
__BEGIN_DECLS

#ifndef __ANDROID_API__
#error Android builds must be compiled against a specific API. If this is an \
 android platform host build, you must use libbinder_ndk_host_user.
#endif

#if __ANDROID_API__ >= 29
#if __ANDROID_API__ >= 29


// Also see TF_* in kernel's binder.h
// Also see TF_* in kernel's binder.h