From 1fc367dfb60232cfec4260e6dab286d8c4384ca3 Mon Sep 17 00:00:00 2001 From: Andrei Homescu Date: Tue, 9 Apr 2024 01:33:32 +0000 Subject: libbinder_ndk: Provide a fake llndk-versioning.h header Remove an unnecessary check for __TRUSTY__ by providing a fake llndk-versioning.h header instead. Bug: 242243245 Test: m libbinder_ndk_on_trusty_mock Change-Id: I10adf0059deb4781c6e1e5ac05ccdc5a83a61cce --- .../ndk/include_platform/android/binder_manager.h | 5 +---- .../trusty/ndk/include/android/llndk-versioning.h | 18 ++++++++++++++++++ libs/binder/trusty/ndk/include/sys/cdefs.h | 1 - 3 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 libs/binder/trusty/ndk/include/android/llndk-versioning.h diff --git a/libs/binder/ndk/include_platform/android/binder_manager.h b/libs/binder/ndk/include_platform/android/binder_manager.h index c665ad82ad..52edae4a38 100644 --- a/libs/binder/ndk/include_platform/android/binder_manager.h +++ b/libs/binder/ndk/include_platform/android/binder_manager.h @@ -18,11 +18,8 @@ #include #include -#include - -#ifndef __TRUSTY__ #include -#endif +#include __BEGIN_DECLS diff --git a/libs/binder/trusty/ndk/include/android/llndk-versioning.h b/libs/binder/trusty/ndk/include/android/llndk-versioning.h new file mode 100644 index 0000000000..3ae3d8f577 --- /dev/null +++ b/libs/binder/trusty/ndk/include/android/llndk-versioning.h @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#define __INTRODUCED_IN_LLNDK(x) /* nothing on Trusty */ diff --git a/libs/binder/trusty/ndk/include/sys/cdefs.h b/libs/binder/trusty/ndk/include/sys/cdefs.h index 7528f2bb45..4e9b0e83c6 100644 --- a/libs/binder/trusty/ndk/include/sys/cdefs.h +++ b/libs/binder/trusty/ndk/include/sys/cdefs.h @@ -27,4 +27,3 @@ #endif #define __INTRODUCED_IN(x) /* nothing on Trusty */ -#define __INTRODUCED_IN_LLNDK(x) /* nothing on Trusty */ -- cgit v1.2.3-59-g8ed1b