--- BasiliskII/src/slirp/ip_icmp.h 2005/05/13 09:00:59 1.1 +++ BasiliskII/src/slirp/ip_icmp.h 2006/01/17 21:19:12 1.3 @@ -47,6 +47,10 @@ typedef u_int32_t n_time; /* * Structure of an icmp header. */ +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(1) +#endif + struct icmp { u_char icmp_type; /* type of message, see below */ u_char icmp_code; /* type sub code */ @@ -83,8 +87,8 @@ struct icmp { struct ip idi_ip; /* options and then 64 bits of data */ } id_ip; - u_long id_mask; - char id_data[1]; + uint32_t id_mask; + char id_data[1]; } icmp_dun; #define icmp_otime icmp_dun.id_ts.its_otime #define icmp_rtime icmp_dun.id_ts.its_rtime @@ -92,7 +96,11 @@ struct icmp { #define icmp_ip icmp_dun.id_ip.idi_ip #define icmp_mask icmp_dun.id_mask #define icmp_data icmp_dun.id_data -}; +} PACKED__; + +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(0) +#endif /* * Lower bounds on packet lengths for various types.