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 */