pkgsrc/multimedia/libmpeg3/patches/patch-ac
abs 2902b40f8c Updated multimedia/libmpeg3 to 1.8
1.8 - Better table of contents generation & handling of ID3 tags.

pkgsrc changes:
	- Fix broken build on NetBSD by reworking the mares nest of
	  non Linux #ifdefs in mpeg3io.c - build was broken by a
	  previous __DragonFly__ or __APPLE_ build fix
	- Add new patch for 1.8 to avoid Linux DVD ioctls
2009-01-29 17:53:49 +00:00

33 lines
863 B
Text

$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.