From owner-freebsd-ports Tue Mar 12 21:10:16 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8BEB437B402 for ; Tue, 12 Mar 2002 21:10:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2D5A1p91928; Tue, 12 Mar 2002 21:10:01 -0800 (PST) (envelope-from gnats) Received: from shumai.marcuscom.com (rdu57-28-046.nc.rr.com [66.57.28.46]) by hub.freebsd.org (Postfix) with ESMTP id CA13E37B41A for ; Tue, 12 Mar 2002 21:05:57 -0800 (PST) Received: (from marcus@localhost) by shumai.marcuscom.com (8.11.6/8.11.6) id g2D56D839598; Wed, 13 Mar 2002 00:06:13 -0500 (EST) (envelope-from marcus) Message-Id: <200203130506.g2D56D839598@shumai.marcuscom.com> Date: Wed, 13 Mar 2002 00:06:13 -0500 (EST) From: Joe Marcus Clarke Reply-To: Joe Marcus Clarke To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/35840: [PATCH] Fix build of devel/libgtop on -CURRENT Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 35840 >Category: ports >Synopsis: [PATCH] Fix build of devel/libgtop on -CURRENT >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Mar 12 21:10:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Joe Marcus Clarke >Release: FreeBSD 4.5-STABLE i386 >Organization: MarcusCom, Inc. >Environment: System: FreeBSD shumai.marcuscom.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Mon Mar 4 23:37:10 EST 2002 marcus@shumai.marcuscom.com:/usr/obj/usr/src/sys/SHUMAI i386 >Description: libgtop is broken on -CURRENT due to the changes proc stucture. This patch corrects the problem. The __FreeBSD_version isn't exactly accurate, but it's the best I could find (off by about 2 days). >How-To-Repeat: Try to build libgtop on -CURRENT. >Fix: --- patch-sysdeps::freebsd::proctime.c.patch begins here --- --- files/patch-sysdeps::freebsd::proctime.c.orig Tue Oct 2 04:00:21 2001 +++ files/patch-sysdeps::freebsd::proctime.c Tue Mar 12 23:59:54 2002 @@ -1,8 +1,5 @@ - -$FreeBSD: ports/devel/libgtop/files/patch-sysdeps::freebsd::proctime.c,v 1.1 2001/10/02 08:00:21 sobomax Exp $ - ---- 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 @@ tot = st + ut + it; if (tot == 0) { -@@ -81,12 +84,7 @@ +@@ -81,13 +84,12 @@ tot = 1; } @@ -35,10 +32,15 @@ - */ - +#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 @@ #endif buf->frequency = 1000000; -@@ -192,6 +190,21 @@ +@@ -192,6 +194,21 @@ buf->flags |= _glibtop_sysdeps_proc_time_user; #else @@ -74,7 +76,7 @@ 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; } --- patch-sysdeps::freebsd::proctime.c.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message