Instead of
typedef struct
{
UINT8 ver;
UINT8 rel;
} GNU_PACKED TRDP_SHORT_VERSION_T;
use something like this:
VOS_PACKED(
{
UINT8 ver;
UINT8 rel;
} , TRDP_SHORT_VERSION_T);
The macro should be implemented in the VOS and for a gcc it would look like:
#define VOS_PACKED(members, name) \
GNU_PACKED struct name members; \
typedef struct name name
Why?
What is the reason behind this request?
Regards
There are several reasons:
With a common macro, you only have to provide one macro instead of searching each occurrence in the code.
Declaring a #pragma pack within the proposed VOS_PACKED macro is rejected by MS compilers (VS 2010...2015).
Sorry, but we decided to leave it like it is for now!