$NetBSD: patch-ak,v 1.2 2003/10/14 16:22:21 salo Exp $

--- mgterm/mdate.c.orig	2001-03-09 11:05:20.000000000 +0000
+++ mgterm/mdate.c
@@ -66,23 +66,23 @@ static int from_main=0;
 void mdate();
 
 static char *icon_mdate="\
-#MGR000200160016
-++++++++++++++++
-+@@@@@@@@@@@@@++
-+@...........@++
-+@...........@++
-+@.@.@.@.@.@.@++
-+@.@.@.@.@.@.@++
-+@...........@++
-+@.@.@.@.@.@.@++
-+@...........@++
-+@.@.@.@.@.@.@++
-+@...........@++
-+@.@.@.@.@.@.@++
-+@...........@++
-+@@@@@@@@@@@@@++
-++++++++++++++++
-++++++++++++++++
+#MGR000200160016\
+++++++++++++++++\
++@@@@@@@@@@@@@++\
++@...........@++\
++@...........@++\
++@.@.@.@.@.@.@++\
++@.@.@.@.@.@.@++\
++@...........@++\
++@.@.@.@.@.@.@++\
++@...........@++\
++@.@.@.@.@.@.@++\
++@...........@++\
++@.@.@.@.@.@.@++\
++@...........@++\
++@@@@@@@@@@@@@++\
+++++++++++++++++\
+++++++++++++++++\
 ";
 main() {
 	int c;
@@ -670,9 +670,10 @@ void mem_draw() {
 #include <sys/swap.h>
 #include <sys/param.h>
 #include <sys/sysctl.h>
-#include <vm/vm_param.h>
-#ifdef UVM
+#if __NetBSD_Version__ > 105009900
 #include <uvm/uvm_extern.h>
+#else
+#include <vm/vm_param.h>
 #endif
 #include <errno.h>
 
@@ -683,7 +684,11 @@ struct swapent swaps[NSWAPS];
 int
 memmode()
 {
+#if __NetBSD_Version__ > 106000000
+	struct uvmexp_sysctl uvmexp;
+#else
 	struct uvmexp uvmexp;
+#endif
 	int mib[2];
 	int size = sizeof(uvmexp);
 	int pagesize = getpagesize();
@@ -694,7 +699,11 @@ memmode()
 	if (!memmode_ok)
 		return 0;
 	mib[0] = CTL_VM;
+#if __NetBSD_Version__ > 106000000
+	mib[1] = VM_UVMEXP2;
+#else
 	mib[1] = VM_UVMEXP;
+#endif
 	if (sysctl(mib, 2, &uvmexp, &size, NULL, 0) < 0) {
 		printf("Can't get uvmexp: %s\n", strerror(errno));
 		memset(&uvmexp, 0, sizeof(uvmexp));
