diff options
author | sobomax <sobomax@FreeBSD.org> | 2002-03-25 17:50:47 +0800 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2002-03-25 17:50:47 +0800 |
commit | bfbcadca36057f6474f1a5455897aeb5b7c58251 (patch) | |
tree | e54b57b42edd3077abdd8ae2d7460ad109a84d4b /devel | |
parent | ab925eae51185af7d3301ecde91347cc15b29957 (diff) | |
download | freebsd-ports-gnome-bfbcadca36057f6474f1a5455897aeb5b7c58251.tar.gz freebsd-ports-gnome-bfbcadca36057f6474f1a5455897aeb5b7c58251.tar.zst freebsd-ports-gnome-bfbcadca36057f6474f1a5455897aeb5b7c58251.zip |
Unbroke on a recent -current.
PR: 35840
Submitted by: Joe Marcus Clarke <marcus@marcuscom.com>
Diffstat (limited to 'devel')
-rw-r--r-- | devel/libgtop/files/patch-sysdeps::freebsd::proctime.c | 20 | ||||
-rw-r--r-- | devel/libgtop2/files/patch-sysdeps::freebsd::proctime.c | 20 |
2 files changed, 22 insertions, 18 deletions
diff --git a/devel/libgtop/files/patch-sysdeps::freebsd::proctime.c b/devel/libgtop/files/patch-sysdeps::freebsd::proctime.c index 583d63e150aa..5176f869ca23 100644 --- a/devel/libgtop/files/patch-sysdeps::freebsd::proctime.c +++ b/devel/libgtop/files/patch-sysdeps::freebsd::proctime.c @@ -1,8 +1,5 @@ - -$FreeBSD$ - ---- sysdeps/freebsd/proctime.c.orig Thu Feb 15 01:48:46 2001 -+++ sysdeps/freebsd/proctime.c Tue Oct 2 10:58:26 2001 +--- sysdeps/freebsd/proctime.c.orig Mon Nov 26 17:37:59 2001 ++++ sysdeps/freebsd/proctime.c Tue Feb 26 12:20:24 2002 @@ -66,14 +66,17 @@ { quad_t totusec; @@ -24,7 +21,7 @@ $FreeBSD$ tot = st + ut + it; if (tot == 0) { -@@ -81,12 +84,7 @@ +@@ -81,13 +84,12 @@ tot = 1; } @@ -35,10 +32,15 @@ $FreeBSD$ - */ - +#if (defined __FreeBSD__) ++#if __FreeBSD_version >= 500030 ++ totusec = (u_quad_t) (p->p_runtime.sec * 1000000 + p->p_runtime.frac); ++#else totusec = (u_quad_t) p->p_runtime; ++#endif #else sec = p->p_rtime.tv_sec; -@@ -157,10 +155,10 @@ + usec = p->p_rtime.tv_usec; +@@ -157,10 +159,10 @@ if ((pinfo == NULL) || (count != 1)) glibtop_error_io_r (server, "kvm_getprocs (%d)", pid); @@ -52,7 +54,7 @@ $FreeBSD$ #endif buf->frequency = 1000000; -@@ -192,6 +190,21 @@ +@@ -192,6 +194,21 @@ buf->flags |= _glibtop_sysdeps_proc_time_user; #else @@ -74,7 +76,7 @@ $FreeBSD$ glibtop_suid_enter (server); if ((pinfo [0].kp_proc.p_flag & P_INMEM) && -@@ -222,6 +235,7 @@ +@@ -222,6 +239,7 @@ buf->flags = _glibtop_sysdeps_proc_time_user; } diff --git a/devel/libgtop2/files/patch-sysdeps::freebsd::proctime.c b/devel/libgtop2/files/patch-sysdeps::freebsd::proctime.c index 583d63e150aa..5176f869ca23 100644 --- a/devel/libgtop2/files/patch-sysdeps::freebsd::proctime.c +++ b/devel/libgtop2/files/patch-sysdeps::freebsd::proctime.c @@ -1,8 +1,5 @@ - -$FreeBSD$ - ---- sysdeps/freebsd/proctime.c.orig Thu Feb 15 01:48:46 2001 -+++ sysdeps/freebsd/proctime.c Tue Oct 2 10:58:26 2001 +--- sysdeps/freebsd/proctime.c.orig Mon Nov 26 17:37:59 2001 ++++ sysdeps/freebsd/proctime.c Tue Feb 26 12:20:24 2002 @@ -66,14 +66,17 @@ { quad_t totusec; @@ -24,7 +21,7 @@ $FreeBSD$ tot = st + ut + it; if (tot == 0) { -@@ -81,12 +84,7 @@ +@@ -81,13 +84,12 @@ tot = 1; } @@ -35,10 +32,15 @@ $FreeBSD$ - */ - +#if (defined __FreeBSD__) ++#if __FreeBSD_version >= 500030 ++ totusec = (u_quad_t) (p->p_runtime.sec * 1000000 + p->p_runtime.frac); ++#else totusec = (u_quad_t) p->p_runtime; ++#endif #else sec = p->p_rtime.tv_sec; -@@ -157,10 +155,10 @@ + usec = p->p_rtime.tv_usec; +@@ -157,10 +159,10 @@ if ((pinfo == NULL) || (count != 1)) glibtop_error_io_r (server, "kvm_getprocs (%d)", pid); @@ -52,7 +54,7 @@ $FreeBSD$ #endif buf->frequency = 1000000; -@@ -192,6 +190,21 @@ +@@ -192,6 +194,21 @@ buf->flags |= _glibtop_sysdeps_proc_time_user; #else @@ -74,7 +76,7 @@ $FreeBSD$ glibtop_suid_enter (server); if ((pinfo [0].kp_proc.p_flag & P_INMEM) && -@@ -222,6 +235,7 @@ +@@ -222,6 +239,7 @@ buf->flags = _glibtop_sysdeps_proc_time_user; } |