On 08.01.2018 18:28, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org>
> ---
>  slirp/ip6_icmp.h | 6 +++---
>  slirp/ip_icmp.h  | 2 +-
>  slirp/slirp.h    | 2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/slirp/ip6_icmp.h b/slirp/ip6_icmp.h
> index b3378b17b5..a4ccc69974 100644
> --- a/slirp/ip6_icmp.h
> +++ b/slirp/ip6_icmp.h
> @@ -17,20 +17,20 @@
>  struct icmp6_echo { /* Echo Messages */
>      uint16_t id;
>      uint16_t seq_num;
> -};
> +} QEMU_PACKED;
>  
>  union icmp6_error_body {
>      uint32_t unused;
>      uint32_t pointer;
>      uint32_t mtu;
> -};
> +} QEMU_PACKED;
>  
>  /*
>   * NDP Messages
>   */
>  struct ndp_rs {     /* Router Solicitation Message */
>      uint32_t reserved;
> -};
> +} QEMU_PACKED;
...
> diff --git a/slirp/slirp.h b/slirp/slirp.h
> index 9f29b52610..9a7287e7cc 100644
> --- a/slirp/slirp.h
> +++ b/slirp/slirp.h
> @@ -103,7 +103,7 @@ struct ethhdr {
>      unsigned char  h_dest[ETH_ALEN];   /* destination eth addr */
>      unsigned char  h_source[ETH_ALEN]; /* source ether addr    */
>      unsigned short h_proto;            /* packet type ID field */
> -};
> +} QEMU_PACKED;
>  
>  struct slirp_arphdr {
>      unsigned short ar_hrd;      /* format of hardware address */
> 

The above structs all look naturally aligned to me - so why do you need
the QEMU_PACKED here?

 Thomas

Reply via email to