summaryrefslogtreecommitdiff
path: root/graphics/mplayer/patches/patch-ab
blob: 3d4cc5b8e46afe03566209ccae5f43dc24401ec3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
$NetBSD: patch-ab,v 1.5 2002/05/07 20:26:13 wiz Exp $

--- libdha/mtrr.c.orig	Sun Apr 28 00:42:24 2002
+++ libdha/mtrr.c
@@ -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