Ticket #8215: patch-bswap.h

File patch-bswap.h, 502 bytes (added by springer.jonathan@…, 15 years ago)

files/patch-bswap.h

Line 
1--- dvdread/bswap.h.old 2006-08-23 21:23:23.000000000 -0400
2+++ dvdread/bswap.h     2006-08-23 21:33:04.000000000 -0400
3@@ -35,7 +35,13 @@
4 #include <sys/param.h>
5 #endif
6 
7-#if defined(__linux__)
8+#if defined(__DARWIN__)
9+#include <libkern/osbyteorder.h>
10+#define B2N_16(x) OSSwapHostToBigInt16(x)
11+#define B2N_32(x) OSSwapHostToBigInt32(x)
12+#define B2N_64(x) OSSwapHostToBigInt64(x)
13+
14+#elif defined(__linux__)
15 #include <byteswap.h>
16 #define B2N_16(x) x = bswap_16(x)
17 #define B2N_32(x) x = bswap_32(x)