summaryrefslogtreecommitdiff
path: root/devel/libgtop/patches
diff options
context:
space:
mode:
authorwiz <wiz>2001-09-25 01:31:18 +0000
committerwiz <wiz>2001-09-25 01:31:18 +0000
commitbdfc290695a96ff72a005d47043e243fac893fd3 (patch)
tree8ed83026eb30813ec0f2084f9b9ca582869cea2c /devel/libgtop/patches
parent819c1f5df7f5bacec6cde10578c6119caa24e3bc (diff)
downloadpkgsrc-bdfc290695a96ff72a005d47043e243fac893fd3.tar.gz
Make build again on 1.5Y, with some help by chuq.
Diffstat (limited to 'devel/libgtop/patches')
-rw-r--r--devel/libgtop/patches/patch-ar22
1 files changed, 18 insertions, 4 deletions
diff --git a/devel/libgtop/patches/patch-ar b/devel/libgtop/patches/patch-ar
index 2b1336b9620..c8b6af82da4 100644
--- a/devel/libgtop/patches/patch-ar
+++ b/devel/libgtop/patches/patch-ar
@@ -1,7 +1,7 @@
-$NetBSD: patch-ar,v 1.2 2000/11/29 21:02:05 tron Exp $
+$NetBSD: patch-ar,v 1.3 2001/09/25 01:31:18 wiz Exp $
--- sysdeps/freebsd/procmem.c.orig Thu May 27 20:56:49 1999
-+++ sysdeps/freebsd/procmem.c Wed Nov 29 21:57:31 2000
++++ sysdeps/freebsd/procmem.c
@@ -31,8 +31,12 @@
#include <sys/param.h>
#include <sys/proc.h>
@@ -39,17 +39,31 @@ $NetBSD: patch-ar,v 1.2 2000/11/29 21:02:05 tron Exp $
#else
struct vm_object object;
#endif
-@@ -233,11 +241,13 @@
+@@ -233,17 +241,27 @@
/* If the object is of type vnode, add its size */
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+#if defined(UVM_VNODE_VALID)
if (!vnode.v_uvm.u_flags & UVM_VNODE_VALID)
continue;
++#endif
if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) ||
!vnode.v_data) continue;
-+#endif
++#if (__NetBSD_Version__ >= 105250000)
++ /* Reference count must be at least two. */
++ if (vnode.v_usecount <= 1)
++ continue;
++
++ buf->share += pagetok (vnode.v_uobj.uo_npages) << LOG1024;
++#else
/* Reference count must be at least two. */
if (vnode.v_uvm.u_obj.uo_refs <= 1)
+ continue;
+
+ buf->share += pagetok (vnode.v_uvm.u_obj.uo_npages) << LOG1024;
++#endif /* __NetBSD_Version__ >= 105250000 */
+ #endif
+
+ #ifdef __FreeBSD__