From f6b439e74024330fff32dbc6932b20a274d04003 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 29 Jun 2017 20:43:03 +0200 Subject: [PATCH] use same msg_format.h everywhere --- include/villas/msg_format.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/villas/msg_format.h b/include/villas/msg_format.h index 137cd376c..cbeadfbe1 100644 --- a/include/villas/msg_format.h +++ b/include/villas/msg_format.h @@ -62,14 +62,16 @@ **/ struct msg { -#if BYTE_ORDER == LITTLE_ENDIAN - unsigned rsvd1 : 2; /**< Reserved bits */ - unsigned type : 2; /**< Data or control message (see MSG_TYPE_*) */ - unsigned version: 4; /**< Specifies the format of the remaining message (see MGS_VERSION) */ -#elif BYTE_ORDER == BIG_ENDIAN +#if BYTE_ORDER == BIG_ENDIAN unsigned version: 4; /**< Specifies the format of the remaining message (see MGS_VERSION) */ unsigned type : 2; /**< Data or control message (see MSG_TYPE_*) */ unsigned rsvd1 : 2; /**< Reserved bits */ +#elif BYTE_ORDER == LITTLE_ENDIAN + unsigned rsvd1 : 2; /**< Reserved bits */ + unsigned type : 2; /**< Data or control message (see MSG_TYPE_*) */ + unsigned version: 4; /**< Specifies the format of the remaining message (see MGS_VERSION) */ +#else + #error Invalid byte-order #endif uint8_t rsvd2; /**< Reserved bits */