diff mbox series

[RFC,mig,8/12] Set max type alignment to sizeof(long)

Message ID 20230212111044.610942-9-bugaevc@gmail.com
State New
Headers show
Series Towards glibc on x86_64-gnu | expand

Commit Message

Sergey Bugaev Feb. 12, 2023, 11:10 a.m. UTC
...not sizeof(int). This appears to be required on x86_64.

PLEASE NOTE: There is now a patch from Flavio Cruz ("Make MIG work for
pure 64 bit kernel and userland") that appears to tackle this same issue
(and more). Most likely this simplistic patch should be dropped in favor
of the one from Flavio.
---
 type.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/type.c b/type.c
index b104c66..7765200 100644
--- a/type.c
+++ b/type.c
@@ -542,7 +542,7 @@  itLongDecl(u_int inname, const_string_t instr, u_int outname,
     it->itOutName = outname;
     it->itOutNameStr = outstr;
     it->itSize = size;
-    it->itAlignment = MIN(word_size, size / 8);
+    it->itAlignment = MIN(sizeof_long, size / 8);
     if (inname == MACH_MSG_TYPE_STRING_C)
     {
 	it->itStruct = false;