34 lines
863 B
Plaintext
34 lines
863 B
Plaintext
$NetBSD: patch-ac,v 1.5 2009/01/29 17:53:49 abs Exp $
|
|
|
|
--- mpeg3ifo.c.orig 2007-12-16 23:25:26.000000000 +0000
|
|
+++ mpeg3ifo.c
|
|
@@ -1,4 +1,3 @@
|
|
-#include <byteswap.h>
|
|
#include <dirent.h>
|
|
#include <fcntl.h>
|
|
#include <stdlib.h>
|
|
@@ -10,6 +9,23 @@
|
|
#include "mpeg3private.h"
|
|
#include "mpeg3protos.h"
|
|
|
|
+#if defined(__NetBSD__)
|
|
+# include <sys/endian.h>
|
|
+# include <machine/bswap.h>
|
|
+# define bswap_16(x) bswap16(x)
|
|
+# define bswap_32(x) bswap32(x)
|
|
+#elif defined(__DragonFly__)
|
|
+# include <sys/endian.h>
|
|
+# define bswap_16(x) bswap16(x)
|
|
+# define bswap_32(x) bswap32(x)
|
|
+#elif defined(linux)
|
|
+# include <byteswap.h>
|
|
+#elif defined(__APPLE__) || defined(__MACH__) /* MacOS X */
|
|
+# include <libkern/OSByteOrder.h>
|
|
+# define bswap_16(x) OSSwapInt16(x)
|
|
+# define bswap_32(x) OSSwapInt32(x)
|
|
+#endif
|
|
+
|
|
typedef struct
|
|
{
|
|
// Bytes relative to start of stream.
|