diff --git a/pri_q921.h b/pri_q921.h index 3ef5566..23bcfdc 100755 --- a/pri_q921.h +++ b/pri_q921.h @@ -78,7 +78,7 @@ typedef struct q921_header { u_int8_t tei:7; /* Terminal Endpoint Identifier (0) */ #endif u_int8_t data[0]; /* Further data */ -} q921_header; +} __attribute__ ((packed)) q921_header; /* A Supervisory Format frame */ typedef struct q921_s { @@ -98,7 +98,7 @@ typedef struct q921_s { #endif u_int8_t data[0]; /* Any further data */ u_int8_t fcs[2]; /* At least an FCS */ -} q921_s; +} __attribute__ ((packed)) q921_s; /* An Unnumbered Format frame */ typedef struct q921_u { @@ -116,7 +116,7 @@ typedef struct q921_u { #endif u_int8_t data[0]; /* Any further data */ u_int8_t fcs[2]; /* At least an FCS */ -} q921_u; +} __attribute__ ((packed)) q921_u; /* An Information frame */ typedef struct q921_i { diff --git a/pri_q931.h b/pri_q931.h index ac77ac7..ee406ba 100755 --- a/pri_q931.h +++ b/pri_q931.h @@ -81,7 +81,7 @@ typedef struct q931_h { #endif u_int8_t contents[0]; u_int8_t crv[3]; -} q931_h; +} __attribute__ ((packed)) q931_h; /* Message type header */ @@ -94,14 +94,14 @@ typedef struct q931_mh { u_int8_t f:1; #endif u_int8_t data[0]; -} q931_mh; +} __attribute__ ((packed)) q931_mh; /* Information element format */ typedef struct q931_ie { u_int8_t ie; u_int8_t len; u_int8_t data[0]; -} q931_ie; +} __attribute__ ((packed)) q931_ie; #define Q931_RES_HAVEEVENT (1 << 0) #define Q931_RES_INERRROR (1 << 1)