* unsigned int bitfields compile differently between GCC 4.8.4 on Linux
and GCC 5.2.0 in msys2. Visual Studio's C Compiler Version 19 builds
the same way as the msys2 GCC.
* Specifiying unsigned short for all platforms does not change the
structure on Linux, but it does fix the msys2 and VS structures.
Change-Id: I5ef10c0485413859a3f93c67ecb3c148a828b3de
Signed-off-by: Henry Beberman <henry.beberman@intel.com>
Signed-off-by: Daniel Ferguson <daniel.j.ferguson@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5511
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: David Antler <david.a.antler@intel.com>
{
struct
{
- unsigned int token_length :4; /* length of Token */
- unsigned int type :2; /* type flag */
- unsigned int version :2; /* protocol version */
- unsigned int code :8; /* request method (value 1--10) or response code (value 40-255) */
+ unsigned short token_length :4; /* length of Token */
+ unsigned short type :2; /* type flag */
+ unsigned short version :2; /* protocol version */
+ unsigned short code :8; /* request method (value 1--10) or response code (value 40-255) */
unsigned short id; /* transaction id (network byte order!) */
unsigned char token[]; /* the actual token, if any */
} coap_hdr_udp_t;