summaryrefslogtreecommitdiffstats
path: root/libdha
diff options
context:
space:
mode:
Diffstat (limited to 'libdha')
-rw-r--r--libdha/mtrr.c8
1 files changed, 8 insertions, 0 deletions
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 <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 @@ int mtrr_set_type(unsigned base,unsigned size,int type)
}
return ENOSYS;
#elif defined (__NetBSD__)
+#if __NetBSD_Version__ > 105240000
struct mtrr *mtrrp;
int n;
@@ -64,6 +68,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;
#endif