summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-11-03 01:29:06 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-11-03 01:29:06 +0100
commite01b2d4e347e587d257b8b84d21ac0a34b9b7948 (patch)
treed28f653d3df1a5b0bee61845e762ba384111867a
parent9165b13a6f5ebe692755edc72dea0936de1ac746 (diff)
mach/message.h: Fix C++ build
-rw-r--r--include/mach/message.h5
1 files changed, 5 insertions, 0 deletions
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.