bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Sergey Bugaev
Subject: [RFC PATCH mig 8/12] Set max type alignment to sizeof(long)
Date: Sun, 12 Feb 2023 14:10:39 +0300

...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 --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;
-- 
2.39.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]