pkgsrc/sysutils/libgtop/patches/patch-cc
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

35 lines
917 B
Text

$NetBSD: patch-cc,v 1.1 2007/11/05 19:06:06 drochner Exp $
--- sysdeps/bsd/procopenfiles.c.orig 2007-04-27 00:27:34.000000000 +0200
+++ sysdeps/bsd/procopenfiles.c
@@ -47,5 +47,30 @@ _glibtop_init_proc_open_files_s (glibtop
glibtop_open_files_entry *
glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pid_t pid)
{
+ memset(buf, 0, sizeof (glibtop_proc_open_files));
+ return NULL;
+}
+
+#include <glibtop/procwd.h>
+
+static const unsigned long _glibtop_sysdeps_proc_wd =
+(1 << GLIBTOP_PROC_WD_EXE) |
+(1 << GLIBTOP_PROC_WD_ROOT) |
+(1 << GLIBTOP_PROC_WD_NUMBER);
+
+/* Init function. */
+
+void
+_glibtop_init_proc_wd_s (glibtop *server)
+{
+ server->sysdeps.proc_wd = _glibtop_sysdeps_proc_wd;
+}
+
+
+/* XXX Unimplemented on BSD */
+char **
+glibtop_get_proc_wd_s (glibtop *server, glibtop_proc_wd *buf, pid_t pid)
+{
+ memset (buf, 0, sizeof (glibtop_proc_wd));
return NULL;
}