]> git.sesse.net Git - vlc/blob - extras/contrib/src/Patches/libdvdnav-mactel.patch
3fba1c39511b0c0b52534317d0778345a9028821
[vlc] / extras / contrib / src / Patches / libdvdnav-mactel.patch
1 diff -puriN libdvdnav-orig/src/dvdread/bswap.h libdvdnav/src/dvdread/bswap.h
2 --- libdvdnav-orig/src/dvdread/bswap.h  2006-01-26 23:26:43.000000000 +0100
3 +++ libdvdnav/src/dvdread/bswap.h       2006-01-26 23:27:57.000000000 +0100
4 @@ -59,6 +59,12 @@
5  #define B2N_32(x) x = be32toh(x)
6  #define B2N_64(x) x = be64toh(x)
7  
8 +#elif defined(__APPLE__)
9 +#include <libkern/OSByteOrder.h>
10 +#define B2N_16(x) x = OSSwapBigToHostConstInt16(x)
11 +#define B2N_32(x) x = OSSwapBigToHostConstInt32(x)
12 +#define B2N_64(x) x = OSSwapBigToHostConstInt64(x)
13 +
14  /* This is a slow but portable implementation, it has multiple evaluation 
15   * problems so beware.
16   * Old FreeBSD's and Solaris don't have <byteswap.h> or any other such