changeset 6011:5f020e2dc745

patchs for NetBSD by Bernd Ernesti <mplayer@lists.veego.de>: - the libmpdvdkit auto check works fine after adding the netbsd check to the linux and freebsd one - NetBSD only support MTRR after 1.5X, so libdha/mtrr.c needs a small patch to only enable it for versions after 1.5X.
author pl
date Tue, 07 May 2002 21:51:47 +0000
parents 3b9e278d23d2
children 89c87be7a248
files configure libdha/mtrr.c
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Tue May 07 15:17:06 2002 +0000
+++ b/configure	Tue May 07 21:51:47 2002 +0000
@@ -2642,7 +2642,7 @@
 echocheck "DVD support (libmpdvdkit)"
 if test "$_dvdkit" = auto ; then
  _dvdkit=no
- if linux || freebsd ; then
+ if linux || freebsd || netbsd ; then
   test -f "./libmpdvdkit/Makefile" && _dvdkit=yes
  fi
 fi
--- a/libdha/mtrr.c	Tue May 07 15:17:06 2002 +0000
+++ b/libdha/mtrr.c	Tue May 07 21:51:47 2002 +0000
@@ -13,11 +13,14 @@
 #include "AsmMacros.h"
 
 #if defined (__i386__) && defined (__NetBSD__)
+#include <sys/param.h>
+#if __NetBSD_Version__ > 105240000
 #include <stdint.h>
 #include <stdlib.h>
 #include <machine/mtrr.h>
 #include <machine/sysarch.h>
 #endif
+#endif
 
 #if defined( __i386__ )
 int	mtrr_set_type(unsigned base,unsigned size,int type)
@@ -47,6 +50,7 @@
     }
     return ENOSYS;
 #elif defined (__NetBSD__)
+#if __NetBSD_Version__ > 105240000
     struct mtrr *mtrrp;
     int n;
 
@@ -64,6 +68,10 @@
     free(mtrrp);
     return 0;
 #else
+    /* NetBSD prior to 1.5Y doesn't have MTRR support */
+    return ENOSYS;
+#endif
+#else
 #warning Please port MTRR stuff!!!
     return ENOSYS;
 #endif