diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2023-11-06 18:01:44 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-11-07 00:05:28 +0100 |
commit | 5e0706dfc69b81d7ec33dac7f1aecae51a2edd7a (patch) | |
tree | a71b4f86731a8a3d03038808b9bf7c00fd3e7ff0 /ipc | |
parent | e01b2d4e347e587d257b8b84d21ac0a34b9b7948 (diff) | |
download | gnumach-5e0706dfc69b81d7ec33dac7f1aecae51a2edd7a.tar.gz gnumach-5e0706dfc69b81d7ec33dac7f1aecae51a2edd7a.tar.bz2 gnumach-5e0706dfc69b81d7ec33dac7f1aecae51a2edd7a.zip |
Fix assertion for i686 since mach_port_name_t and mach_port_t have the same size
Message-ID: <ZUlwWGgc2kXNH5dN@jupiter.tail36e24.ts.net>
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc_kmsg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c index 1b98445d..fb8de249 100644 --- a/ipc/ipc_kmsg.c +++ b/ipc/ipc_kmsg.c @@ -2385,7 +2385,8 @@ ipc_kmsg_copyout_body( /* first allocate memory in the map */ uint64_t allocated = length; - assert(sizeof(mach_port_name_t) < sizeof(mach_port_t)); + _Static_assert(sizeof(mach_port_name_t) <= sizeof(mach_port_t), + "Size of mach_port_t should be equal or larger than mach_port_name_t."); allocated -= (sizeof(mach_port_t) - sizeof(mach_port_name_t)) * number; kr = vm_allocate(map, &addr, allocated, TRUE); |