Le 15/09/2019 à 23:39, Philippe Mathieu-Daudé a écrit : > Target architectures align types differently for instance > m68k aligns on 16bit whereas others on 32bit). > Use ABI types to keep alignments good. > > Suggested-by: Laurent Vivier <[email protected]> > Signed-off-by: Philippe Mathieu-Daudé <[email protected]> > --- > RFC: Is target_sockaddr_ll.sll_ifindex of type abi_int? > > linux-user/syscall_defs.h | 34 +++++++++++++++++----------------- > 1 file changed, 17 insertions(+), 17 deletions(-) > > diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h > index 7694d72446..852d4498e0 100644 > --- a/linux-user/syscall_defs.h > +++ b/linux-user/syscall_defs.h > @@ -134,22 +134,22 @@ > #define TARGET_IOWRU(type,nr) > TARGET_IOC(TARGET_IOC_READ|TARGET_IOC_WRITE,(type),(nr),TARGET_IOC_SIZEMASK) > > struct target_sockaddr { > - uint16_t sa_family; > + abi_ushort sa_family; > uint8_t sa_data[14]; > }; > > struct target_sockaddr_ll { > - uint16_t sll_family; /* Always AF_PACKET */ > - uint16_t sll_protocol; /* Physical layer protocol */ > - int sll_ifindex; /* Interface number */ > - uint16_t sll_hatype; /* ARP hardware type */ > - uint8_t sll_pkttype; /* Packet type */ > - uint8_t sll_halen; /* Length of address */ > - uint8_t sll_addr[8]; /* Physical layer address */ > + abi_ushort sll_family; /* Always AF_PACKET */ > + abi_ushort sll_protocol; /* Physical layer protocol */ > + int sll_ifindex; /* Interface number */
abi_int would be better. Thanks, Laurent
