From 5d2421798f79e825d4bd4b21fe001255b7e0ad14 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Fri, 13 Nov 2020 19:38:50 +0000 Subject: libbinder: move kernel includes out of namespace Avoid including files inside of a namespace, which changes the namespace of their definitions. Bug: 173188702 Test: build only Change-Id: I0e649e57549e1f011dbdbedac11a076f8588e070 --- libs/binder/include/binder/Parcel.h | 2 +- libs/binder/include/private/binder/binder_module.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/binder/include/binder/Parcel.h b/libs/binder/include/binder/Parcel.h index 84bfe38032..70e5882f94 100644 --- a/libs/binder/include/binder/Parcel.h +++ b/libs/binder/include/binder/Parcel.h @@ -39,13 +39,13 @@ typedef unsigned int binder_size_t; typedef unsigned long long binder_size_t; #endif +struct flat_binder_object; // --------------------------------------------------------------------------- namespace android { template class Flattenable; template class LightFlattenable; -struct flat_binder_object; class IBinder; class IPCThreadState; class ProcessState; diff --git a/libs/binder/include/private/binder/binder_module.h b/libs/binder/include/private/binder/binder_module.h index 0fe7f5b088..5a719b8930 100644 --- a/libs/binder/include/private/binder/binder_module.h +++ b/libs/binder/include/private/binder/binder_module.h @@ -17,10 +17,6 @@ #ifndef _BINDER_MODULE_H_ #define _BINDER_MODULE_H_ -#ifdef __cplusplus -namespace android { -#endif - /* obtain structures and constants from the kernel header */ // TODO(b/31559095): bionic on host @@ -36,6 +32,10 @@ namespace android { #include #include +#ifdef __cplusplus +namespace android { +#endif + #ifndef BR_FROZEN_REPLY // Temporary definition of BR_FROZEN_REPLY. For production // this will come from UAPI binder.h -- cgit v1.2.3-59-g8ed1b