From e01b2d4e347e587d257b8b84d21ac0a34b9b7948 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 3 Nov 2023 01:29:06 +0100 Subject: mach/message.h: Fix C++ build --- include/mach/message.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/mach/message.h b/include/mach/message.h index 2177343a..816d257a 100644 --- a/include/mach/message.h +++ b/include/mach/message.h @@ -281,9 +281,14 @@ typedef struct { } __attribute__ ((aligned (__alignof__ (uintptr_t)))) mach_msg_type_long_t; #ifdef __x86_64__ +#ifdef __cplusplus +static_assert (sizeof (mach_msg_type_t) == sizeof (mach_msg_type_long_t), + "mach_msg_type_t and mach_msg_type_long_t need to have the same size."); +#else _Static_assert (sizeof (mach_msg_type_t) == sizeof (mach_msg_type_long_t), "mach_msg_type_t and mach_msg_type_long_t need to have the same size."); #endif +#endif /* * Known values for the msgt_name field. -- cgit v1.2.3