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

Commit 6932fe1b authored by Steven Moreland's avatar Steven Moreland
Browse files

libbinder_ndk: __ANDROID_NDK__ canary

Noticed recently that libbinder_ndk had a static variant. Adding this
canary so that there is an error if it is accidentally compiled into an
app. This is aimed as a protection against potential future variants.

Bug: 136027762
Test: N/A
Change-Id: I7eaf1c0f12d9891fbb2a2f1dbaae06f06d6545cf
parent a9860b6d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -27,6 +27,10 @@ using ::android::internal::Stability;
#error libbinder_ndk should only be built in a system context
#endif

#ifdef __ANDROID_NDK__
#error libbinder_ndk should only be built in a system context
#endif

// explicit extern because symbol is only declared in header when __ANDROID_VNDK__
extern "C" void AIBinder_markVendorStability(AIBinder* binder) {
    Stability::markVndk(binder->getBinder().get());