pkgsrc/multimedia/libmpeg3/patches/patch-ah
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
954 B
Text

$NetBSD: patch-ah,v 1.8 2009/01/29 17:53:49 abs Exp $
--- mpeg3tocutil.c.orig 2008-06-21 04:53:27.000000000 +0100
+++ mpeg3tocutil.c
@@ -5,7 +5,27 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/stat.h>
+
+#if defined(__NetBSD__) || defined(__DragonFly__) || (defined(__APPLE__) && defined(__MACH__))
+# include <sys/param.h>
+# include <sys/mount.h>
+
+# if defined(__APPLE__) && defined(__MACH__)
+#include <sys/cdefs.h>
+# endif
+# if (defined(__NetBSD__) && __NetBSD_Version__ >= 299000900 /* 2.99.9 */) || defined(__DragonFly__) || (defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN_64_BIT_INO_T) /* MacOSX < 10.5 */)
+# define stat64 stat
+# endif
+# if defined(__NetBSD__) && __NetBSD_Version__ >= 299000900 /* 2.99.9 */
+# define statfs statvfs
+# endif
+
+# include <sys/types.h>
+# include <sys/stat.h>
+#else
+# include <mntent.h>
+# include <sys/stat.h>
+#endif
static FILE *test_file = 0;