From 411bc4af1eecc51158298ce8cde54710f5e302d2 Mon Sep 17 00:00:00 2001 From: pl Date: Tue, 7 May 2002 21:51:47 +0000 Subject: [PATCH] patchs for NetBSD by Bernd Ernesti : - 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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6012 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 2 +- libdha/mtrr.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 627b4e9fad..f455d9415c 100755 --- a/configure +++ b/configure @@ -2642,7 +2642,7 @@ fi 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 diff --git a/libdha/mtrr.c b/libdha/mtrr.c index aec32fcf0e..d4cc376feb 100644 --- a/libdha/mtrr.c +++ b/libdha/mtrr.c @@ -13,11 +13,14 @@ #include "AsmMacros.h" #if defined (__i386__) && defined (__NetBSD__) +#include +#if __NetBSD_Version__ > 105240000 #include #include #include #include #endif +#endif #if defined( __i386__ ) int mtrr_set_type(unsigned base,unsigned size,int type) @@ -47,6 +50,7 @@ int mtrr_set_type(unsigned base,unsigned size,int type) } return ENOSYS; #elif defined (__NetBSD__) +#if __NetBSD_Version__ > 105240000 struct mtrr *mtrrp; int n; @@ -63,6 +67,10 @@ int mtrr_set_type(unsigned base,unsigned size,int type) } 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;