[MPlayer-dev-eng] [PATCH] two NetBSD patches

Bernd Ernesti mplayer at lists.veego.de
Tue May 7 22:46:14 CEST 2002


Hi,

here are two small patches for NetBSD:

- the libmpdvdkit auto check works fine after adding the netbsd check to the linux
  and freebsd one.  See the attached patch.configure
- NetBSD only support MTRR after 1.5X, so libdha/mtrr.c needs a small patch
  to only enable it for versions after 1.5X. See the attached patch.mtrr

Bernd

-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.459
diff -c -r1.459 configure
*** configure	3 May 2002 22:13:06 -0000	1.459
--- configure	7 May 2002 20:08:39 -0000
***************
*** 2642,2648 ****
  echocheck "DVD support (libmpdvdkit)"
  if test "$_dvdkit" = auto ; then
   _dvdkit=no
!  if linux || freebsd ; then
    test -f "./libmpdvdkit/Makefile" && _dvdkit=yes
   fi
  fi
--- 2642,2648 ----
  echocheck "DVD support (libmpdvdkit)"
  if test "$_dvdkit" = auto ; then
   _dvdkit=no
!  if linux || freebsd || netbsd ; then
    test -f "./libmpdvdkit/Makefile" && _dvdkit=yes
   fi
  fi
-------------- next part --------------
Index: libdha/mtrr.c
===================================================================
RCS file: /cvsroot/mplayer/main/libdha/mtrr.c,v
retrieving revision 1.4
diff -c -r1.4 mtrr.c
*** libdha/mtrr.c	27 Apr 2002 22:42:24 -0000	1.4
--- libdha/mtrr.c	7 May 2002 20:09:13 -0000
***************
*** 13,23 ****
--- 13,26 ----
  #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,52 ****
--- 50,56 ----
      }
      return ENOSYS;
  #elif defined (__NetBSD__)
+ #if __NetBSD_Version__ > 105240000
      struct mtrr *mtrrp;
      int n;
  
***************
*** 64,69 ****
--- 68,77 ----
      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


More information about the MPlayer-dev-eng mailing list