diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-08-03 00:52:45 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-08-03 00:52:45 +0800 |
commit | d830dcef523103aa2e5d2db7c2eb416f73bab8f2 (patch) | |
tree | 76580de5ef8bb29a7fb2cc3ed6303e01dc9845ed /devel | |
parent | c07e8ddf0fda3d5436ee8a6908985f62788fe3e5 (diff) | |
download | marcuscom-ports-d830dcef523103aa2e5d2db7c2eb416f73bab8f2.tar marcuscom-ports-d830dcef523103aa2e5d2db7c2eb416f73bab8f2.tar.gz marcuscom-ports-d830dcef523103aa2e5d2db7c2eb416f73bab8f2.tar.bz2 marcuscom-ports-d830dcef523103aa2e5d2db7c2eb416f73bab8f2.tar.lz marcuscom-ports-d830dcef523103aa2e5d2db7c2eb416f73bab8f2.tar.xz marcuscom-ports-d830dcef523103aa2e5d2db7c2eb416f73bab8f2.tar.zst marcuscom-ports-d830dcef523103aa2e5d2db7c2eb416f73bab8f2.zip |
FreeBSD < 6.X does not have a kinfo_proc.ki_rusage_ch member.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@4371 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'devel')
-rw-r--r-- | devel/libgtop2/files/patch-systeps::freebsd::proctime.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/devel/libgtop2/files/patch-systeps::freebsd::proctime.c b/devel/libgtop2/files/patch-systeps::freebsd::proctime.c index e237bd0c0..9857d6cb8 100644 --- a/devel/libgtop2/files/patch-systeps::freebsd::proctime.c +++ b/devel/libgtop2/files/patch-systeps::freebsd::proctime.c @@ -1,6 +1,6 @@ ---- sysdeps/freebsd/proctime.c.orig Wed Feb 23 00:20:45 2005 -+++ sysdeps/freebsd/proctime.c Mon Aug 1 12:02:29 2005 -@@ -146,8 +146,10 @@ +--- sysdeps/freebsd/proctime.c.orig Wed Feb 23 03:20:45 2005 ++++ sysdeps/freebsd/proctime.c Tue Aug 2 12:49:38 2005 +@@ -146,8 +146,10 @@ glibtop_get_proc_time_p (glibtop *server /* Get the process information */ pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count); @@ -13,7 +13,7 @@ #if defined(__FreeBSD__) && (__FreeBSD_version >= 500013) buf->rtime = pinfo [0].ki_runtime; -@@ -193,9 +195,9 @@ +@@ -193,9 +195,13 @@ glibtop_get_proc_time_p (glibtop *server if ((pinfo [0].ki_flag & P_INMEM)) { #endif buf->utime = pinfo [0].ki_runtime; @@ -21,7 +21,11 @@ + buf->stime = tv2sec (pinfo [0].ki_rusage.ru_stime); buf->cutime = tv2sec (pinfo [0].ki_childtime); - buf->cstime = 0; /* XXX */ ++#if __FreeBSD_version >= 600000 + buf->cstime = tv2sec (pinfo [0].ki_rusage_ch.ru_stime); ++#else ++ buf->cstime = 0; ++#endif buf->start_time = tv2sec (pinfo [0].ki_start); buf->flags = _glibtop_sysdeps_proc_time_user; } |