summaryrefslogtreecommitdiff
path: root/graphics/mgl/patches/patch-ak
blob: 536cb170eebef970b187807e3f3edc98219640c0 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
$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 <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));