aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/isup_types.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/isup_types.h b/include/isup_types.h
index 51c5e79..1b4983b 100644
--- a/include/isup_types.h
+++ b/include/isup_types.h
@@ -23,6 +23,7 @@
#define isup_types_h
#include <stdint.h>
+#include <endian.h>
struct msgb;
struct mtp_link;
@@ -32,8 +33,13 @@ struct mtp_link;
#define ISUP_MSG_GRA 0x29
struct isup_msg_hdr {
+#if __BYTE_ORDER == __LITTLE_ENDIAN
uint16_t cic : 12,
spare : 4;
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ uint16_t spare : 4,
+ cic : 12;
+#endif
uint8_t msg_type;
uint8_t data[0];
} __attribute__((packed));