From: Guy Harris Date: Sun, 16 Feb 2014 04:01:06 +0000 (-0800) Subject: Mark structures with UNALIGNED. X-Git-Tag: tcpdump-4.6.0~226 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/2c2d923201145ab633c8492126c2844b0e131730 Mark structures with UNALIGNED. Maybe this will fix the crashes that appear to be occurring on the opencsw.org buildbot; it's building with Sun/Oracle C, not GCC, but it's at least worth a try. --- diff --git a/print-dccp.c b/print-dccp.c index 0d020d65..06ea2cd1 100644 --- a/print-dccp.c +++ b/print-dccp.c @@ -48,7 +48,7 @@ struct dccp_hdr { u_int8_t dccph_xtr; u_int32_t dccph_seq; } dccph_xtrs; -}; +} UNALIGNED; #define DCCPH_CCVAL(dh) (((dh)->dccph_ccval_cscov >> 4) & 0xF) #define DCCPH_CSCOV(dh) (((dh)->dccph_ccval_cscov) & 0xF) @@ -64,7 +64,7 @@ struct dccp_hdr { */ struct dccp_hdr_ext { u_int32_t dccph_seq_low; -}; +} UNALIGNED; /** * struct dccp_hdr_request - Conection initiation request header @@ -73,7 +73,7 @@ struct dccp_hdr_ext { */ struct dccp_hdr_request { u_int32_t dccph_req_service; -}; +} UNALIGNED; /** * struct dccp_hdr_ack_bits - acknowledgment bits common to most packets @@ -84,7 +84,7 @@ struct dccp_hdr_request { struct dccp_hdr_ack_bits { u_int32_t dccph_ra; u_int32_t dccph_ack_nr_low; -}; +} UNALIGNED; #define DCCPH_ACK(dh_ack) ((dh_ack)->dccph_ra >> 8) @@ -98,7 +98,7 @@ struct dccp_hdr_ack_bits { struct dccp_hdr_response { struct dccp_hdr_ack_bits dccph_resp_ack; u_int32_t dccph_resp_service; -}; +} UNALIGNED; /** * struct dccp_hdr_reset - Unconditionally shut down a connection @@ -109,7 +109,7 @@ struct dccp_hdr_reset { struct dccp_hdr_ack_bits dccph_reset_ack; u_int8_t dccph_reset_code, dccph_reset_data[3]; -}; +} UNALIGNED; enum dccp_pkt_type { DCCP_PKT_REQUEST = 0,