summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toxav/rtp.h24
-rw-r--r--toxcore/network.h11
2 files changed, 16 insertions, 19 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;
diff --git a/toxcore/network.h b/toxcore/network.h
index cf4948de..dd654b8d 100644
--- a/toxcore/network.h
+++ b/toxcore/network.h
@@ -44,15 +44,12 @@
44#define WINVER 0x0501 44#define WINVER 0x0501
45#endif 45#endif
46 46
47// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms737629(v=vs.85).aspx 47// The mingw32/64 Windows library warns about including winsock2.h after
48// for why. In short: we need to avoid inclusion of <winsock.h> by <windows.h>, 48// windows.h even though with the above it's a valid thing to do. So, to make
49// so <winsock2.h> doesn't cause issues. 49// mingw32 headers happy, we include winsock2.h first.
50#ifndef WIN32_LEAN_AND_MEAN 50#include <winsock2.h>
51#define WIN32_LEAN_AND_MEAN
52#endif
53 51
54#include <windows.h> 52#include <windows.h>
55#include <winsock2.h>
56#include <ws2tcpip.h> 53#include <ws2tcpip.h>
57 54
58#ifndef IPV6_V6ONLY 55#ifndef IPV6_V6ONLY