summaryrefslogtreecommitdiff
path: root/sysutils/xosview/patches/patch-ah
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/xosview/patches/patch-ah')
-rw-r--r--sysutils/xosview/patches/patch-ah62
1 files changed, 62 insertions, 0 deletions
diff --git a/sysutils/xosview/patches/patch-ah b/sysutils/xosview/patches/patch-ah
new file mode 100644
index 00000000000..e807bca1ce2
--- /dev/null
+++ b/sysutils/xosview/patches/patch-ah
@@ -0,0 +1,62 @@
+$NetBSD: patch-ah,v 1.1 2002/12/11 22:35:56 christos Exp $
+
+--- bsd/swapinternal.cc.orig Tue Feb 16 09:09:21 1999
++++ bsd/swapinternal.cc Wed Dec 11 17:33:24 2002
+@@ -68,8 +68,10 @@
+ #ifdef XOSVIEW_FREEBSD
+ #include <sys/rlist.h>
+ #else
++#ifndef HAVE_SWAPCTL
+ #include <sys/map.h> /* For struct mapent. */
+ #endif
++#endif
+
+ #include <kvm.h> /* For all sorts of stuff. */
+ #ifndef HAVE_SWAPCTL
+@@ -118,10 +120,12 @@
+ #ifdef XOSVIEW_FREEBSD
+ static struct rlisthdr swaplist;
+ #else
++#ifndef HAVE_SWAPCTL
+ static int nswapmap;
+ static struct map *swapmap, *kswapmap;
+ static struct mapent *mp;
+ #endif
++#endif
+ static int nfree;
+
+ #define SVAR(var) __STRING(var) /* to force expansion */
+@@ -174,6 +178,7 @@
+ KGET1(VM_SWDEVT, &ptr, sizeof ptr, "swdevt");
+ KGET2(ptr, sw, (signed) (nswdev * sizeof(*sw)), "*swdevt");
+ #else /* XOSVIEW_FREEBSD */
++#ifndef HAVE_SWAPCTL
+ KGET(VM_NSWAPMAP, nswapmap);
+ KGET(VM_SWAPMAP, kswapmap); /* kernel `swapmap' is a pointer */
+ if ((sw = (struct swdevt*) malloc(nswdev * sizeof(*sw))) == NULL ||
+@@ -184,6 +189,9 @@
+ return (0);
+ }
+ KGET1(VM_SWDEVT, sw, (signed) (nswdev * sizeof(*sw)), "swdevt");
++#else
++ return(0);
++#endif
+ #endif /* XOSVIEW_FREEBSD */
+ once = 1;
+ return (1);
+@@ -243,6 +251,7 @@
+ void
+ fetchswap()
+ {
++#ifndef HAVE_SWAPCTL
+ int s, e, i;
+ int elast;
+ struct mapent* localmp;
+@@ -299,6 +308,7 @@
+ s = bound;
+ }
+ }
++#endif
+ }
+ #endif /* XOSVIEW_FREEBSD */
+