about summary refs log tree commit diff stats
path: root/src/include
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-12-15 16:07:20 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-12-15 16:07:25 +0100
commitd90522bc4ef003a3f643d53f390b77bc1e27b234 (patch)
treec681f7ffc14a638390e823245dd8879b099aef7d /src/include
parent0f7bec0d38597914e86fc3afc2fc431c661f4d1c (diff)
downloadbox64-d90522bc4ef003a3f643d53f390b77bc1e27b234.tar.gz
box64-d90522bc4ef003a3f643d53f390b77bc1e27b234.zip
[BOX32] Rollback simplied alignment of msghdr as cmsg also needs alignment (some docs are eroneous about cmsg_len field type)
Diffstat (limited to 'src/include')
-rwxr-xr-xsrc/include/myalign32.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/include/myalign32.h b/src/include/myalign32.h
index 80928b3c..ad26de3d 100755
--- a/src/include/myalign32.h
+++ b/src/include/myalign32.h
@@ -518,24 +518,25 @@ struct i386_msghdr
   ptr_t     msg_control;  // void *
   ulong_t   msg_controllen;
   int msg_flags;
-} __attribute__((packed, aligned(4)));
+};
 
 struct i386_mmsghdr {
     struct i386_msghdr msg_hdr;
     unsigned int       msg_len;
 };
 
+// Some docs show cmsg_len as a socklen_t (so uint32_t), but thsi not true, it's a size_t (kernel_size_t)
 struct i386_cmsghdr
 {
-  uint32_t cmsg_len;
+  ulong_t cmsg_len;
   int cmsg_level;
   int cmsg_type;
-} __attribute__((packed, aligned(4)));
+};
 
 void AlignIOV_32(void* dest, void* source);   // x86 -> Native
 void UnalignIOV_32(void* dest, void* source); // Native -> x86
 
-void AlignMsgHdr_32(void* dest, void* dest_iov, void* source);   // x86 -> Native
+void AlignMsgHdr_32(void* dest, void* dest_iov, void* dest_cmsg, void* source, int convert_control);    // x86 -> Native
 void UnalignMsgHdr_32(void* dest, void* source); // back to Native -> x86
 
 struct i386_passwd