summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andrei Homescu <ahomescu@google.com> 2024-04-09 01:33:32 +0000
committer Andrei Homescu <ahomescu@google.com> 2024-05-02 22:51:57 +0000
commit1fc367dfb60232cfec4260e6dab286d8c4384ca3 (patch)
tree92e595ff64a8c6eb8f37f3dd26959d4f61f030ea
parent0dbe6326a7eeade8351086224bb01e52404e3a89 (diff)
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
-rw-r--r--libs/binder/ndk/include_platform/android/binder_manager.h5
-rw-r--r--libs/binder/trusty/ndk/include/android/llndk-versioning.h18
-rw-r--r--libs/binder/trusty/ndk/include/sys/cdefs.h1
3 files changed, 19 insertions, 5 deletions
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 <android/binder_ibinder.h>
#include <android/binder_status.h>
-#include <sys/cdefs.h>
-
-#ifndef __TRUSTY__
#include <android/llndk-versioning.h>
-#endif
+#include <sys/cdefs.h>
__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 */