diff -uNr libdvdnav-0.1.9/src/bswap.h libdvdnav-0.1.9-new/src/bswap.h --- libdvdnav-0.1.9/src/bswap.h Tue Apr 29 14:31:35 2003 +++ libdvdnav-0.1.9-new/src/bswap.h Sat Nov 13 17:37:08 2004 @@ -59,6 +59,12 @@ #define B2N_32(x) x = be32toh(x) #define B2N_64(x) x = be64toh(x) +#elif defined(__DARWIN__) +#include +#define B2N_16(x) NXSwapShort(x) +#define B2N_32(x) NXSwapInt(x) +#define B2N_64(x) NXSwapLongLong(x) + /* This is a slow but portable implementation, it has multiple evaluation * problems so beware. * Old FreeBSD's and Solaris don't have or any other such diff -uNr libdvdnav-0.1.9/src/vm.c libdvdnav-0.1.9-new/src/vm.c --- libdvdnav-0.1.9/src/vm.c Tue Apr 29 10:25:20 2003 +++ libdvdnav-0.1.9-new/src/vm.c Sat Nov 13 17:44:18 2004 @@ -45,6 +45,8 @@ #ifdef _MSC_VER #include /* read() */ #define lseek64 lseek +#elif defined(__DARWIN__) +#define lseek64 lseek #endif /* _MSC_VER */ /* @@ -128,7 +130,7 @@ static void dvd_read_name(char *name, const char *device) { int fd, i; -#if !defined(__FreeBSD__) && !defined(WIN32) +#if !defined(__FreeBSD__) && !defined(WIN32) && !defined(__DARWIN__) off64_t off; #else off_t off;