$NetBSD: patch-ak,v 1.3 2007/12/05 13:38:27 obache 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 #include #include -#include -#ifdef UVM +#if __NetBSD_Version__ > 105009900 #include +#else +#include #endif #include @@ -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));