diff options
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/libgtop/Makefile | 8 | ||||
-rw-r--r-- | sysutils/libgtop/PLIST | 3 | ||||
-rw-r--r-- | sysutils/libgtop/distinfo | 16 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-da | 22 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-db | 14 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-dc | 18 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-dd | 13 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-de | 82 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-df | 50 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-dg | 30 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-dh | 28 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-di | 29 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-dj | 22 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-dk | 43 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-dl | 18 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-dm | 18 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-dn | 39 |
17 files changed, 450 insertions, 3 deletions
diff --git a/sysutils/libgtop/Makefile b/sysutils/libgtop/Makefile index 798888b2b57..b7018718aeb 100644 --- a/sysutils/libgtop/Makefile +++ b/sysutils/libgtop/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.26 2009/05/26 18:49:04 drochner Exp $ +# $NetBSD: Makefile,v 1.27 2009/07/11 13:14:13 hasso Exp $ DISTNAME= libgtop-2.26.1 +PKGREVISION= 1 CATEGORIES= sysutils gnome MASTER_SITES= ${MASTER_SITE_GNOME:=sources/libgtop/2.26/} EXTRACT_SUFX= .tar.bz2 @@ -62,6 +63,11 @@ post-install: ${CHMOD} g+s ${DESTDIR}${PREFIX}/bin/libgtop_server2 .endif +PLIST_VARS+= glibtop_private.h +.if ${OPSYS} == "Linux" || ${OPSYS} == "SunOS" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly" +PLIST.glibtop_private.h= yes +.endif + # XXX This needs a check in the configure script, which should be clean # enough to be integrated in the mainstream sources. statvfs_h= /usr/include/sys/statvfs.h diff --git a/sysutils/libgtop/PLIST b/sysutils/libgtop/PLIST index 89684187e53..4d71b88d317 100644 --- a/sysutils/libgtop/PLIST +++ b/sysutils/libgtop/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.10 2009/06/14 18:16:09 joerg Exp $ +@comment $NetBSD: PLIST,v 1.11 2009/07/11 13:14:13 hasso Exp $ ${PLIST.server}bin/libgtop_daemon2 ${PLIST.server}bin/libgtop_server2 include/libgtop-2.0/glibtop.h @@ -40,6 +40,7 @@ include/libgtop-2.0/glibtop/union.h include/libgtop-2.0/glibtop/uptime.h include/libgtop-2.0/glibtop/version.h include/libgtop-2.0/glibtop_machine.h +${PLIST.glibtop_private.h}include/libgtop-2.0/glibtop_private.h include/libgtop-2.0/glibtop_server.h ${PLIST.suid.h}include/libgtop-2.0/glibtop_suid.h include/libgtop-2.0/libgtopconfig.h diff --git a/sysutils/libgtop/distinfo b/sysutils/libgtop/distinfo index 687755e1dff..f01eab95e97 100644 --- a/sysutils/libgtop/distinfo +++ b/sysutils/libgtop/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.14 2009/05/26 18:49:04 drochner Exp $ +$NetBSD: distinfo,v 1.15 2009/07/11 13:14:13 hasso Exp $ SHA1 (libgtop-2.26.1.tar.bz2) = 758bbf69009c6bcfe2765de97e7027124c5a147e RMD160 (libgtop-2.26.1.tar.bz2) = 5177aad953508b20d794d2390204b5b07bc364f5 @@ -20,3 +20,17 @@ SHA1 (patch-ca) = 06bc86bce721155315a1905b750f795629460ff7 SHA1 (patch-cb) = cabc971530d8113694ff6d04108490749d40bcec SHA1 (patch-cc) = 2cb1d2da57a8622c93ed255a416ed9c811e775a2 SHA1 (patch-cd) = cf96896ddde9c830c1e808d8bf37b9fdb611ed24 +SHA1 (patch-da) = 9b3a1ecdc149b1d4e8f64c5e035a51d78aa6578b +SHA1 (patch-db) = e3efc8ac9cf2320fef788b6265b0012ea4d3d660 +SHA1 (patch-dc) = ada7813f4a4203cc8d1bfa46bce7b87ecee06bc0 +SHA1 (patch-dd) = fea61bea21b1d1ae52f614ce9804a1132f3f368f +SHA1 (patch-de) = 85c5cb3d1185c8cc68ab09c7d16ed39e22a12093 +SHA1 (patch-df) = 8c1dab41b7449a2c706792036cf393553cebf9f0 +SHA1 (patch-dg) = b10933f50a1561d211afb6e817be9613cab37607 +SHA1 (patch-dh) = 1c07bccae7a69974e4ab38ffc9ee74b3f10c4ba4 +SHA1 (patch-di) = 95a8566cc319f6f00510135902f921e3e0686ad4 +SHA1 (patch-dj) = 8389a0c6ca45e509022aa6bdbba51800bb57c4db +SHA1 (patch-dk) = c95e5aa709dff7685af03f19e830d15fd17c0315 +SHA1 (patch-dl) = 9d6a44be02ec21d195076125c0cdfe5b51a0ab0a +SHA1 (patch-dm) = ef08973aecacb1fb69f258632dd36edfdafd8c50 +SHA1 (patch-dn) = 66f66731a3abd1290f67d62f9ef654f68756bccb diff --git a/sysutils/libgtop/patches/patch-da b/sysutils/libgtop/patches/patch-da new file mode 100644 index 00000000000..04b7062f86c --- /dev/null +++ b/sysutils/libgtop/patches/patch-da @@ -0,0 +1,22 @@ +$NetBSD: patch-da,v 1.1 2009/07/11 13:14:13 hasso Exp $ + +--- configure.orig 2009-04-13 22:32:32 +0300 ++++ configure 2009-07-11 14:14:29 +0300 +@@ -21527,7 +21527,7 @@ echo $ECHO_N "checking for libgtop sysde + libgtop_need_server=yes + libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server2 && chmod 2755 $(bindir)/libgtop_server2' + ;; +- freebsd*|kfreebsd*) ++ freebsd*|kfreebsd*|dragonfly*) + libgtop_sysdeps_dir=freebsd + libgtop_use_machine_h=yes + libgtop_need_server=yes +@@ -21594,7 +21594,7 @@ echo "${ECHO_T}$libgtop_sysdeps_dir" >&6 + + + case "$host_os" in +- *bsd*) ++ *bsd*|dragonfly*) + case "$host_os" in + *kfreebsd*) + { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5 diff --git a/sysutils/libgtop/patches/patch-db b/sysutils/libgtop/patches/patch-db new file mode 100644 index 00000000000..8458fc06207 --- /dev/null +++ b/sysutils/libgtop/patches/patch-db @@ -0,0 +1,14 @@ +$NetBSD: patch-db,v 1.1 2009/07/11 13:14:13 hasso Exp $ + +--- sysdeps/freebsd/glibtop_machine.h.orig 2009-07-10 22:47:31 +0300 ++++ sysdeps/freebsd/glibtop_machine.h 2009-07-10 22:47:58 +0300 +@@ -25,7 +25,9 @@ + #include <sys/param.h> + #include <nlist.h> + #include <kvm.h> ++#ifndef __DragonFly__ + #include <sys/dkstat.h> ++#endif + #include <time.h> + #include <sys/user.h> + #include <sys/types.h> diff --git a/sysutils/libgtop/patches/patch-dc b/sysutils/libgtop/patches/patch-dc new file mode 100644 index 00000000000..3e4a3944094 --- /dev/null +++ b/sysutils/libgtop/patches/patch-dc @@ -0,0 +1,18 @@ +$NetBSD: patch-dc,v 1.1 2009/07/11 13:14:13 hasso Exp $ + +--- sysdeps/freebsd/cpu.c.orig 2009-07-10 22:48:38 +0300 ++++ sysdeps/freebsd/cpu.c 2009-07-10 22:51:26 +0300 +@@ -53,6 +53,7 @@ _glibtop_init_cpu_s (glibtop *server) + void + glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf) + { ++#ifndef __DragonFly__ + long cpts [CPUSTATES]; + struct clockinfo ci; + size_t length; +@@ -111,4 +112,5 @@ glibtop_get_cpu_s (glibtop *server, glib + if (ncpu > 1) { + buf->flags |= _glibtop_sysdeps_cpu_smp; + } ++#endif + } diff --git a/sysutils/libgtop/patches/patch-dd b/sysutils/libgtop/patches/patch-dd new file mode 100644 index 00000000000..c9ced319d8f --- /dev/null +++ b/sysutils/libgtop/patches/patch-dd @@ -0,0 +1,13 @@ +$NetBSD: patch-dd,v 1.1 2009/07/11 13:14:13 hasso Exp $ + +--- sysdeps/freebsd/open.c.orig 2009-07-10 22:52:03 +0300 ++++ sysdeps/freebsd/open.c 2009-07-10 22:53:37 +0300 +@@ -65,6 +65,8 @@ glibtop_open_p (glibtop *server, const c + server->machine.egid = getegid (); + #if defined(__FreeBSD_kernel__) + server->os_version_code = __FreeBSD_kernel_version; ++#elif defined(__DragonFly__) ++ server->os_version_code = __DragonFly_version; + #else + server->os_version_code = __FreeBSD_version; + #endif diff --git a/sysutils/libgtop/patches/patch-de b/sysutils/libgtop/patches/patch-de new file mode 100644 index 00000000000..dc3464deaca --- /dev/null +++ b/sysutils/libgtop/patches/patch-de @@ -0,0 +1,82 @@ +$NetBSD: patch-de,v 1.1 2009/07/11 13:14:13 hasso Exp $ + +--- sysdeps/freebsd/proclist.c.orig 2009-07-10 23:21:10 +0300 ++++ sysdeps/freebsd/proclist.c 2009-07-10 23:30:28 +0300 +@@ -95,7 +95,11 @@ glibtop_get_proclist_p (glibtop *server, + for (i = 0; i < len; i++) { + pid_t pid; + ++#ifdef __DragonFly__ ++ pid = (pid_t) pinfo[i].kp_pid; ++#else + pid = (pid_t) pinfo[i].ki_pid; ++#endif + + switch (which & GLIBTOP_KERN_PROC_MASK) { + case GLIBTOP_KERN_PROC_ALL: +@@ -105,29 +109,53 @@ glibtop_get_proclist_p (glibtop *server, + continue; + break; + case GLIBTOP_KERN_PROC_UID: ++#ifdef __DragonFly__ ++ if ((uid_t) arg != pinfo[i].kp_ruid) ++#else + if ((uid_t) arg != pinfo[i].ki_ruid) ++#endif + continue; + break; + case GLIBTOP_KERN_PROC_PGRP: ++#ifdef __DragonFly__ ++ if ((pid_t) arg != pinfo[i].kp_pgid) ++#else + if ((pid_t) arg != pinfo[i].ki_pgid) ++#endif + continue; + break; + case GLIBTOP_KERN_PROC_SESSION: ++#ifdef __DragonFly__ ++ if ((pid_t) arg != pinfo[i].kp_sid) ++#else + if ((pid_t) arg != pinfo[i].ki_sid) ++#endif + continue; + break; + case GLIBTOP_KERN_PROC_TTY: ++#ifdef __DragonFly__ ++ if ((dev_t) arg != pinfo[i].kp_tdev) ++#else + if ((dev_t) arg != pinfo[i].ki_tdev) ++#endif + continue; + break; + case GLIBTOP_KERN_PROC_RUID: ++#ifdef __DragonFly__ ++ if ((uid_t) arg != pinfo[i].kp_ruid) ++#else + if ((uid_t) arg != pinfo[i].ki_ruid) ++#endif + continue; + break; + } + + if (which & GLIBTOP_EXCLUDE_NOTTY) ++#ifdef __DragonFly__ ++ if (pinfo[i].kp_tdev == (dev_t) -1) continue; ++#else + if (pinfo[i].ki_tdev == (dev_t) -1) continue; ++#endif + + if (which & GLIBTOP_EXCLUDE_IDLE) { + glibtop_get_proc_state_p (server, &procstate, pid); +@@ -136,7 +164,11 @@ glibtop_get_proclist_p (glibtop *server, + } + + if (which & GLIBTOP_EXCLUDE_SYSTEM) ++#ifdef __DragonFly__ ++ if (pinfo[i].kp_ruid == (uid_t) 0) continue; ++#else + if (pinfo[i].ki_ruid == (uid_t) 0) continue; ++#endif + + g_array_append_val (pids, pid); + } diff --git a/sysutils/libgtop/patches/patch-df b/sysutils/libgtop/patches/patch-df new file mode 100644 index 00000000000..4e5528013ea --- /dev/null +++ b/sysutils/libgtop/patches/patch-df @@ -0,0 +1,50 @@ +$NetBSD: patch-df,v 1.1 2009/07/11 13:14:13 hasso Exp $ + +--- sysdeps/freebsd/procstate.c.orig 2008-05-24 01:13:23 +0300 ++++ sysdeps/freebsd/procstate.c 2009-07-11 15:26:10 +0300 +@@ -64,6 +64,37 @@ glibtop_get_proc_state_p (glibtop *serve + return; + } + ++#ifdef __DragonFly__ ++ buf->uid = pinfo[0].kp_ruid; ++ buf->gid = pinfo[0].kp_rgid; ++ ++ g_strlcpy (buf->cmd, pinfo[0].kp_comm, sizeof (buf->cmd)); ++ ++ switch (pinfo[0].kp_stat) { ++ case SACTIVE: ++ switch (pinfo[0].kp_lwp.kl_stat) { ++ case LSRUN: ++ buf->state = GLIBTOP_PROCESS_RUNNING; ++ break; ++ case LSSLEEP: ++ buf->state = GLIBTOP_PROCESS_INTERRUPTIBLE; ++ break; ++ case LSSTOP: ++ buf->state = GLIBTOP_PROCESS_STOPPED; ++ break; ++ default: ++ buf->state = 0; ++ break; ++ } ++ case SZOMB: ++ buf->state = GLIBTOP_PROCESS_ZOMBIE; ++ break; ++ case SIDL: ++ default: ++ buf->state = 0; ++ break; ++ } ++#else + buf->uid = pinfo[0].ki_ruid; + buf->gid = pinfo[0].ki_rgid; + +@@ -91,6 +122,7 @@ glibtop_get_proc_state_p (glibtop *serve + buf->state = 0; + break; + } ++#endif + + buf->flags = _glibtop_sysdeps_proc_state; + } diff --git a/sysutils/libgtop/patches/patch-dg b/sysutils/libgtop/patches/patch-dg new file mode 100644 index 00000000000..aba540ad651 --- /dev/null +++ b/sysutils/libgtop/patches/patch-dg @@ -0,0 +1,30 @@ +$NetBSD: patch-dg,v 1.1 2009/07/11 13:14:13 hasso Exp $ + +--- sysdeps/freebsd/procuid.c.orig 2009-07-10 23:41:21 +0300 ++++ sysdeps/freebsd/procuid.c 2009-07-10 23:43:41 +0300 +@@ -64,6 +64,17 @@ glibtop_get_proc_uid_p (glibtop *server, + return; + } + ++#ifdef __DragonFly__ ++#define PROC_RUID kp_ruid ++#define PROC_EUID kp_uid ++#define PROC_RGID kp_rgid ++#define PROC_SVGID kp_svgid ++#define PROC_PPID kp_ppid ++#define PROC_PGID kp_pgid ++#define PROC_TPGID kp_tpgid ++#define PROC_NICE kp_nice ++#define PROC_PRIORITY kp_lwp.kl_tdprio ++#else + #define PROC_RUID ki_ruid + #define PROC_EUID ki_uid + #define PROC_RGID ki_rgid +@@ -73,6 +84,7 @@ glibtop_get_proc_uid_p (glibtop *server, + #define PROC_TPGID ki_tpgid + #define PROC_NICE ki_nice + #define PROC_PRIORITY ki_pri.pri_user ++#endif + + buf->uid = pinfo [0].PROC_RUID; + buf->euid = pinfo [0].PROC_EUID; diff --git a/sysutils/libgtop/patches/patch-dh b/sysutils/libgtop/patches/patch-dh new file mode 100644 index 00000000000..93c44553d51 --- /dev/null +++ b/sysutils/libgtop/patches/patch-dh @@ -0,0 +1,28 @@ +$NetBSD: patch-dh,v 1.1 2009/07/11 13:14:13 hasso Exp $ + +--- sysdeps/freebsd/proctime.c.orig 2009-07-10 23:46:59 +0300 ++++ sysdeps/freebsd/proctime.c 2009-07-10 23:53:38 +0300 +@@ -80,7 +80,9 @@ glibtop_get_proc_time_p (glibtop *server + + glibtop_suid_leave (server); + ++#ifndef __DragonFly__ /* TODO */ + buf->rtime = pinfo [0].ki_runtime * 1e-6; ++#endif + + len = sizeof (ci); + if (sysctlbyname ("kern.clockrate", &ci, &len, NULL, 0)) { +@@ -94,6 +96,7 @@ glibtop_get_proc_time_p (glibtop *server + + buf->rtime *= buf->frequency; + ++#ifndef __DragonFly__ /* TODO */ + if ((pinfo [0].ki_flag & PS_INMEM)) { + buf->utime = (pinfo [0].ki_runtime * 1e-6) * buf->frequency; + buf->stime = tv2sec (pinfo [0].ki_rusage.ru_stime) * buf->frequency; +@@ -106,4 +109,5 @@ glibtop_get_proc_time_p (glibtop *server + buf->start_time = tv2sec (pinfo [0].ki_start); + buf->flags |= _glibtop_sysdeps_proc_time_user; + } ++#endif + } diff --git a/sysutils/libgtop/patches/patch-di b/sysutils/libgtop/patches/patch-di new file mode 100644 index 00000000000..dc8bf6dfa2f --- /dev/null +++ b/sysutils/libgtop/patches/patch-di @@ -0,0 +1,29 @@ +$NetBSD: patch-di,v 1.1 2009/07/11 13:14:13 hasso Exp $ + +--- sysdeps/freebsd/procmem.c.orig 2009-07-10 23:55:49 +0300 ++++ sysdeps/freebsd/procmem.c 2009-07-11 00:04:52 +0300 +@@ -34,8 +34,10 @@ + #include <vm/vm_map.h> + + #include <sys/vnode.h> ++#ifndef __DragonFly__ + #include <ufs/ufs/quota.h> + #include <ufs/ufs/inode.h> ++#endif + + #include <sys/ucred.h> + #include <sys/user.h> +@@ -93,6 +95,7 @@ glibtop_get_proc_mem_p (glibtop *server, + return; + } + ++#ifndef __DragonFly__ /* TODO */ + #define PROC_VMSPACE ki_vmspace + + buf->rss_rlim = pinfo [0].ki_rssize; +@@ -157,4 +160,5 @@ glibtop_get_proc_mem_p (glibtop *server, + + buf->flags = _glibtop_sysdeps_proc_mem | + _glibtop_sysdeps_proc_mem_share; ++#endif + } diff --git a/sysutils/libgtop/patches/patch-dj b/sysutils/libgtop/patches/patch-dj new file mode 100644 index 00000000000..0e1a200fc91 --- /dev/null +++ b/sysutils/libgtop/patches/patch-dj @@ -0,0 +1,22 @@ +$NetBSD: patch-dj,v 1.1 2009/07/11 13:14:13 hasso Exp $ + +--- sysdeps/freebsd/procsignal.c.orig 2009-07-11 00:06:33 +0300 ++++ sysdeps/freebsd/procsignal.c 2009-07-11 00:08:36 +0300 +@@ -66,10 +66,17 @@ glibtop_get_proc_signal_p (glibtop *serv + return; + } + ++#ifdef __DragonFly__ ++#define PROC_SIGLIST kp_siglist ++#define PROC_SIGMASK kp_lwp.kl_sigmask ++#define PROC_SIGIGNORE kp_sigignore ++#define PROC_SIGCATCH kp_sigcatch ++#else + #define PROC_SIGLIST ki_siglist + #define PROC_SIGMASK ki_sigmask + #define PROC_SIGIGNORE ki_sigignore + #define PROC_SIGCATCH ki_sigcatch ++#endif + + /* signal: mask of pending signals. + * pinfo [0].kp_proc.p_siglist diff --git a/sysutils/libgtop/patches/patch-dk b/sysutils/libgtop/patches/patch-dk new file mode 100644 index 00000000000..6b068a46c36 --- /dev/null +++ b/sysutils/libgtop/patches/patch-dk @@ -0,0 +1,43 @@ +$NetBSD: patch-dk,v 1.1 2009/07/11 13:14:13 hasso Exp $ + +--- sysdeps/freebsd/procmap.c.orig 2008-08-18 18:23:36 +0300 ++++ sysdeps/freebsd/procmap.c 2009-07-11 14:53:45 +0300 +@@ -19,6 +19,8 @@ + Boston, MA 02111-1307, USA. + */ + ++#ifndef __DragonFly__ /* TODO */ ++ + #include <config.h> + #include <glibtop.h> + #include <glibtop/error.h> +@@ -299,3 +301,29 @@ glibtop_get_proc_map_p (glibtop *server, + + return (glibtop_map_entry*) g_array_free(maps, FALSE); + } ++#else /* __DragonFly__ */ ++ ++#include <config.h> ++#include <glibtop.h> ++#include <glibtop/error.h> ++#include <glibtop/procmap.h> ++ ++static const unsigned long _glibtop_sysdeps_proc_map = 0; ++ ++/* Init function. */ ++ ++void ++_glibtop_init_proc_map_p (glibtop *server) ++{ ++ server->sysdeps.proc_map = _glibtop_sysdeps_proc_map; ++} ++ ++/* Provides detailed information about a process. */ ++ ++glibtop_map_entry * ++glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf, pid_t pid) ++{ ++ memset (buf, 0, sizeof (glibtop_proc_map)); ++ return NULL; ++} ++#endif /* __DragonFly__ */ diff --git a/sysutils/libgtop/patches/patch-dl b/sysutils/libgtop/patches/patch-dl new file mode 100644 index 00000000000..065aea261e7 --- /dev/null +++ b/sysutils/libgtop/patches/patch-dl @@ -0,0 +1,18 @@ +$NetBSD: patch-dl,v 1.1 2009/07/11 13:14:13 hasso Exp $ + +--- sysdeps/freebsd/procsegment.c.orig 2009-07-11 00:17:02 +0300 ++++ sysdeps/freebsd/procsegment.c 2009-07-11 00:18:25 +0300 +@@ -69,8 +69,13 @@ glibtop_get_proc_segment_p (glibtop *ser + return; + } + ++#ifdef __DragonFly__ ++ buf->text_rss = pinfo[0].kp_vm_tsize * pagesize; ++ buf->data_rss = pinfo[0].kp_vm_dsize * pagesize; ++#else + buf->text_rss = pinfo[0].ki_tsize * pagesize; + buf->data_rss = pinfo[0].ki_dsize * pagesize; ++#endif + + buf->flags = _glibtop_sysdeps_proc_segment; + } diff --git a/sysutils/libgtop/patches/patch-dm b/sysutils/libgtop/patches/patch-dm new file mode 100644 index 00000000000..ed901534e28 --- /dev/null +++ b/sysutils/libgtop/patches/patch-dm @@ -0,0 +1,18 @@ +$NetBSD: patch-dm,v 1.1 2009/07/11 13:14:13 hasso Exp $ + +--- sysdeps/freebsd/netload.c.orig 2009-07-11 13:42:20 +0300 ++++ sysdeps/freebsd/netload.c 2009-07-11 14:01:00 +0300 +@@ -91,6 +91,7 @@ void + glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, + const char *interface) + { ++#ifndef __DragonFly__ /* TODO */ + struct ifnet ifnet; + u_long ifnetaddr, ifnetfound; + struct sockaddr *sa = NULL; +@@ -251,4 +252,5 @@ glibtop_get_netload_p (glibtop *server, + } + return; + } ++#endif /* !__DragonFly__ */ + } diff --git a/sysutils/libgtop/patches/patch-dn b/sysutils/libgtop/patches/patch-dn new file mode 100644 index 00000000000..7593f7ccd88 --- /dev/null +++ b/sysutils/libgtop/patches/patch-dn @@ -0,0 +1,39 @@ +$NetBSD: patch-dn,v 1.1 2009/07/11 13:14:13 hasso Exp $ + +--- sysdeps/freebsd/prockernel.c.orig 2009-07-11 14:07:07 +0300 ++++ sysdeps/freebsd/prockernel.c 2009-07-11 14:11:59 +0300 +@@ -91,9 +91,13 @@ glibtop_get_proc_kernel_p (glibtop *serv + + glibtop_suid_leave (server); + ++#ifdef __DragonFly__ ++#define PROC_WCHAN kp_lwp.kl_wchan ++#define PROC_WMESG kp_lwp.kl_wmesg ++#else + #define PROC_WCHAN ki_wchan + #define PROC_WMESG ki_wmesg +-#define PROC_WMESG ki_wmesg ++#endif + + buf->nwchan = (unsigned long) pinfo [0].PROC_WCHAN; + +@@ -107,6 +111,11 @@ glibtop_get_proc_kernel_p (glibtop *serv + buf->wchan [0] = 0; + } + ++#ifdef __DragonFly__ ++ buf->k_flags = (unsigned long) pinfo [0].kp_flags; ++ buf->min_flt = (unsigned long) pinfo [0].kp_ru.ru_minflt; ++ buf->maj_flt = (unsigned long) pinfo [0].kp_ru.ru_majflt; ++#else + buf->k_flags = (unsigned long) pinfo [0].ki_flag; + buf->min_flt = (unsigned long) pinfo [0].ki_rusage.ru_minflt; + buf->maj_flt = (unsigned long) pinfo [0].ki_rusage.ru_majflt; +@@ -114,6 +123,7 @@ glibtop_get_proc_kernel_p (glibtop *serv + buf->cmin_flt = (unsigned long) buf->min_flt + pinfo [0].ki_rusage_ch.ru_minflt; + buf->cmaj_flt = (unsigned long) buf->maj_flt + pinfo [0].ki_rusage_ch.ru_majflt; + #endif ++#endif + + buf->flags |= _glibtop_sysdeps_proc_kernel_pstats; + |