-
#define PACK_END __attribute__((packed)) /*用于限定结构体单字节对齐*/
-
-
typedef struct
-
{
-
UINT8 channelNumber;
-
UINT64 startTime;
-
UINT16 duration;
-
-
} PACK_END IEEEtypes_Common11hHdr_MeasReq_t;
-
-
//另外有些编译要求的语法为
-
typedef __packed struct
-
{
-
UINT8 channelNumber;
-
UINT64 startTime;
-
UINT16 duration;
-
-
} IEEEtypes_Basic_MeasReq_t
通用格式. 限定 字节对齐的. (windows上也适用)
#pragma pack(push, 1)
...
#pragma pack(pop)