From 54de13c1c7b8e22a3668d4325e77611857071c2a Mon Sep 17 00:00:00 2001 From: iphydf Date: Thu, 8 Sep 2016 00:29:44 +0100 Subject: Fix compilation for Windows. - Mingw32 didn't read MSDN, so behaves badly despite lean and mean. - Avoid alignment issues on windows with packed bitfields in the RTP header. This change makes the program ill-formed in C99, but I don't know the correct fix at the moment, and I don't want to keep the Windows build broken for too long. --- toxav/rtp.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'toxav/rtp.h') diff --git a/toxav/rtp.h b/toxav/rtp.h index 4d60682a..18929e12 100644 --- a/toxav/rtp.h +++ b/toxav/rtp.h @@ -37,21 +37,21 @@ enum { struct RTPHeader { /* Standard RTP header */ #ifndef WORDS_BIGENDIAN - unsigned cc: 4; /* Contributing sources count */ - unsigned xe: 1; /* Extra header */ - unsigned pe: 1; /* Padding */ - unsigned ve: 2; /* Version */ + uint16_t cc: 4; /* Contributing sources count */ + uint16_t xe: 1; /* Extra header */ + uint16_t pe: 1; /* Padding */ + uint16_t ve: 2; /* Version */ - unsigned pt: 7; /* Payload type */ - unsigned ma: 1; /* Marker */ + uint16_t pt: 7; /* Payload type */ + uint16_t ma: 1; /* Marker */ #else - unsigned ve: 2; /* Version */ - unsigned pe: 1; /* Padding */ - unsigned xe: 1; /* Extra header */ - unsigned cc: 4; /* Contributing sources count */ + uint16_t ve: 2; /* Version */ + uint16_t pe: 1; /* Padding */ + uint16_t xe: 1; /* Extra header */ + uint16_t cc: 4; /* Contributing sources count */ - unsigned ma: 1; /* Marker */ - unsigned pt: 7; /* Payload type */ + uint16_t ma: 1; /* Marker */ + uint16_t pt: 7; /* Payload type */ #endif uint16_t sequnum; -- cgit v1.2.3