summaryrefslogtreecommitdiff
path: root/toxav/rtp.h
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2016-09-08 00:29:44 +0100
committeriphydf <iphydf@users.noreply.github.com>2016-09-08 11:37:35 +0100
commit54de13c1c7b8e22a3668d4325e77611857071c2a (patch)
treed23f30232d235c56cd6e27ca449574e947b0e177 /toxav/rtp.h
parentd5f9344847ed10cbf89e64bcba0eda225ab6d434 (diff)
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.
Diffstat (limited to 'toxav/rtp.h')
-rw-r--r--toxav/rtp.h24
1 files changed, 12 insertions, 12 deletions
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 {
37struct RTPHeader { 37struct RTPHeader {
38 /* Standard RTP header */ 38 /* Standard RTP header */
39#ifndef WORDS_BIGENDIAN 39#ifndef WORDS_BIGENDIAN
40 unsigned cc: 4; /* Contributing sources count */ 40 uint16_t cc: 4; /* Contributing sources count */
41 unsigned xe: 1; /* Extra header */ 41 uint16_t xe: 1; /* Extra header */
42 unsigned pe: 1; /* Padding */ 42 uint16_t pe: 1; /* Padding */
43 unsigned ve: 2; /* Version */ 43 uint16_t ve: 2; /* Version */
44 44
45 unsigned pt: 7; /* Payload type */ 45 uint16_t pt: 7; /* Payload type */
46 unsigned ma: 1; /* Marker */ 46 uint16_t ma: 1; /* Marker */
47#else 47#else
48 unsigned ve: 2; /* Version */ 48 uint16_t ve: 2; /* Version */
49 unsigned pe: 1; /* Padding */ 49 uint16_t pe: 1; /* Padding */
50 unsigned xe: 1; /* Extra header */ 50 uint16_t xe: 1; /* Extra header */
51 unsigned cc: 4; /* Contributing sources count */ 51 uint16_t cc: 4; /* Contributing sources count */
52 52
53 unsigned ma: 1; /* Marker */ 53 uint16_t ma: 1; /* Marker */
54 unsigned pt: 7; /* Payload type */ 54 uint16_t pt: 7; /* Payload type */
55#endif 55#endif
56 56
57 uint16_t sequnum; 57 uint16_t sequnum;