From 67472af88130a7f0108165ce1096bb396378b622 Mon Sep 17 00:00:00 2001 From: Lixiaoying25 Date: Mon, 8 Jul 2024 06:05:25 +0000 Subject: [PATCH 1/2] update base/include/flat_obj.h. Signed-off-by: Lixiaoying25 --- base/include/flat_obj.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/base/include/flat_obj.h b/base/include/flat_obj.h index 1691998..42676c9 100644 --- a/base/include/flat_obj.h +++ b/base/include/flat_obj.h @@ -33,6 +33,16 @@ typedef u_int64_t __u64; #endif +#if INTPTR_MAX == INT32_MAX +#define BINDER_IPC_32BIT +#elif INTPTR_MAX == INT64_MAX +#ifdef BINDER_IPC_32BIT +#undef BINDER_IPC_32BIT +#endif +#else +#error "Environment not 32 or 64 bit system." +#endif + #ifdef BINDER_IPC_32BIT typedef __u32 binder_size_t; typedef __u32 binder_uintptr_t; -- Gitee From 423589beead7992850ee216fc929b21febc05561 Mon Sep 17 00:00:00 2001 From: Lixiaoying25 Date: Mon, 8 Jul 2024 06:24:56 +0000 Subject: [PATCH 2/2] update base/include/flat_obj.h. Signed-off-by: Lixiaoying25 --- base/include/flat_obj.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/base/include/flat_obj.h b/base/include/flat_obj.h index 42676c9..24d149a 100644 --- a/base/include/flat_obj.h +++ b/base/include/flat_obj.h @@ -33,6 +33,14 @@ typedef u_int64_t __u64; #endif +#ifdef BINDER_IPC_32BIT + typedef __u32 binder_size_t; + typedef __u32 binder_uintptr_t; +#else + typedef __u64 binder_size_t; + typedef __u64 binder_uintptr_t; +#endif + #if INTPTR_MAX == INT32_MAX #define BINDER_IPC_32BIT #elif INTPTR_MAX == INT64_MAX @@ -43,14 +51,6 @@ #error "Environment not 32 or 64 bit system." #endif -#ifdef BINDER_IPC_32BIT - typedef __u32 binder_size_t; - typedef __u32 binder_uintptr_t; -#else - typedef __u64 binder_size_t; - typedef __u64 binder_uintptr_t; -#endif - struct parcel_binder_object_header { __u32 type; }; -- Gitee