pkgsrc/sysutils/libgtop/patches/patch-ag
drochner 4d7f1acf90 update to 2.20.0
This switches to the new gnome-2.20 branch.

pkgsrc notes:
-System dependant parts were reorganized upstream, in particular there
 if a subtree for FreeBSD now, and one for the other BSDs. I didn't
 pull in the DragonFly patches because I can't decide whether to base
 them on the freebsd or the rest.
-I've changed the NetBSD code to use kinfo_proc2 almost completely.
 Some vm statistics reporting might be less accurate now because
 some fields in proc2 seem to be unmaintained by the current kernel
 (eg ixrss).
-Also, some libgtop functions might be able to run in the non-privileged
 part now, but dealing with this would require even more #ifdefs, so
 we should consider setting up a private subtree as FreeBSD did.
-I didn't verify with older NetBSDs; kvm_getproc2() has been in the
 tree for quite some time so I hope it will just work without the need
 for excessive "#if __NetBSD_Version__ > t".
2007-11-05 19:06:02 +00:00

27 lines
945 B
Text

$NetBSD: patch-ag,v 1.6 2007/11/05 19:06:04 drochner Exp $
--- sysdeps/bsd/mem.c.orig 2007-04-27 00:27:34.000000000 +0200
+++ sysdeps/bsd/mem.c
@@ -81,7 +81,9 @@ static int mib [] = { CTL_VM, VM_TOTAL }
static int mib [] = { CTL_VM, VM_METER };
#endif
-#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) || defined(__OpenBSD__)
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+static int mib_uvmexp [] = { CTL_VM, VM_UVMEXP2 };
+#elif defined(__OpenBSD__)
static int mib_uvmexp [] = { CTL_VM, VM_UVMEXP };
#endif
@@ -117,7 +119,10 @@ glibtop_get_mem_p (glibtop *server, glib
{
struct vmtotal vmt;
size_t length_vmt;
-#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) || defined(__OpenBSD__)
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
+ struct uvmexp_sysctl uvmexp;
+ size_t length_uvmexp;
+#elif defined(__OpenBSD__)
struct uvmexp uvmexp;
size_t length_uvmexp;
#else