diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mach/message.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/mach/message.h b/include/mach/message.h index 63341e6f..eb3b34c0 100644 --- a/include/mach/message.h +++ b/include/mach/message.h @@ -139,7 +139,15 @@ typedef integer_t mach_msg_id_t; typedef struct mach_msg_header { mach_msg_bits_t msgh_bits; mach_msg_size_t msgh_size; - mach_port_t msgh_remote_port; + union { + mach_port_t msgh_remote_port; + /* + * Ensure msgh_remote_port is wide enough to hold a kernel pointer + * to avoid message resizing for the 64 bits case. This field should + * not be used since it is here just for padding purposes. + */ + rpc_uintptr_t msgh_remote_port_do_not_use; + }; union { mach_port_t msgh_local_port; rpc_uintptr_t msgh_protected_payload; @@ -153,7 +161,10 @@ typedef struct mach_msg_header { typedef struct { mach_msg_bits_t msgh_bits; mach_msg_size_t msgh_size; - mach_port_name_t msgh_remote_port; + union { + mach_port_name_t msgh_remote_port; + rpc_uintptr_t msgh_remote_port_do_not_use; + }; union { mach_port_name_t msgh_local_port; rpc_uintptr_t msgh_protected_payload; |