From 9f21e5b7dc203f4cd38c7ab19097653425cc103a Mon Sep 17 00:00:00 2001 From: "lothilic@163.com" Date: Tue, 11 Apr 2023 11:37:44 +0800 Subject: [PATCH] Redefine linux data type to adapt ios Redefine __u32, __u64 to u_int32_t, u_int64_t on ios platform. Issue: https://gitee.com/openharmony/commonlibrary_c_utils/issues/I6UNKZ Change-Id: I6a1ddc18cbc1877dd5dbc0abdf4bfe1e92a5964e Signed-off-by: hezonglin2@huawei.com --- base/include/flat_obj.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/base/include/flat_obj.h b/base/include/flat_obj.h index 5aaa9cc..5d715ff 100644 --- a/base/include/flat_obj.h +++ b/base/include/flat_obj.h @@ -28,6 +28,10 @@ #ifndef IOS_PLATFORM #include +#else + typedef u_int32_t __u32; + typedef u_int64_t __u64; +#endif #ifdef BINDER_IPC_32BIT typedef __u32 binder_size_t; @@ -36,15 +40,6 @@ typedef __u64 binder_size_t; typedef __u64 binder_uintptr_t; #endif -#else -#ifdef BINDER_IPC_32BIT - typedef u_int32_t binder_size_t; - typedef u_int32_t binder_uintptr_t; -#else - typedef u_int64_t binder_size_t; - typedef u_int64_t binder_uintptr_t; -#endif -#endif struct parcel_binder_object_header { __u32 type; -- Gitee