diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h index ecd45138026cea1d175f79fdc6f7706d8657a10f..733dde7f3d514e823dcf190e6f0f2b3bc5636bd0 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h @@ -472,6 +472,41 @@ struct __sanitizer_cmsghdr { int cmsg_level; int cmsg_type; }; +// OHOS_LOCAL begin +#elif SANITIZER_OHOS +struct __sanitizer_msghdr { + void *msg_name; + unsigned msg_namelen; + struct __sanitizer_iovec *msg_iov; +#if LONG_MAX > 0x7fffffff && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + int __pad1; +#endif + unsigned msg_iovlen; +#if LONG_MAX > 0x7fffffff && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + int __pad1; +#endif + void *msg_control; +#if LONG_MAX > 0x7fffffff && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + int __pad2; +#endif + unsigned msg_controllen; +#if LONG_MAX > 0x7fffffff && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + int __pad2; +#endif + int msg_flags; +}; +struct __sanitizer_cmsghdr { +#if LONG_MAX > 0x7fffffff && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + int __pad1; +#endif + unsigned cmsg_len; +#if LONG_MAX > 0x7fffffff && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + int __pad1; +#endif + int cmsg_level; + int cmsg_type; +}; +// OHOS_LOCAL end #else // In POSIX, int msg_iovlen; socklen_t msg_controllen; socklen_t cmsg_len; but // many implementations don't conform to the standard.