From philip@paeps.cx  Fri Mar  7 13:31:13 2003
Return-Path: <philip@paeps.cx>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 99F2B37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  7 Mar 2003 13:31:13 -0800 (PST)
Received: from eos.telenet-ops.be (eos.telenet-ops.be [195.130.132.40])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B8C1D43F3F
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  7 Mar 2003 13:31:12 -0800 (PST)
	(envelope-from philip@paeps.cx)
Received: from localhost (localhost.localdomain [127.0.0.1])
	by eos.telenet-ops.be (Postfix) with SMTP
	id EB0AB1FFBF; Fri,  7 Mar 2003 22:31:11 +0100 (CET)
Received: from fortuna.home.paeps.cx (D5768746.kabel.telenet.be [213.118.135.70])
	by eos.telenet-ops.be (Postfix) with ESMTP
	id 49D811FF6C; Fri,  7 Mar 2003 22:31:11 +0100 (CET)
Received: from juno.home.paeps.cx (juno.home.paeps.cx [2001:ab8:2007:0:240:f4ff:fe31:3090])
	by fortuna.home.paeps.cx (Postfix) with ESMTP
	id 89D2220D5; Fri,  7 Mar 2003 22:31:08 +0100 (CET)
Received: by juno.home.paeps.cx (Postfix, from userid 1001)
	id 180DC2098; Fri,  7 Mar 2003 22:31:07 +0100 (CET)
Message-Id: <20030307213107.180DC2098@juno.home.paeps.cx>
Date: Fri,  7 Mar 2003 22:31:07 +0100 (CET)
From: Philip Paeps <philip@paeps.cx>
Reply-To: Philip Paeps <philip@paeps.cx>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Seiichi SATO <ssato@sh.rim.or.jp>
Subject: Unbreak sysutils/wmcpuload on -CURRENT
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         49016
>Category:       ports
>Synopsis:       Unbreak sysutils/wmcpuload on -CURRENT
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pat
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 07 13:40:10 PST 2003
>Closed-Date:    Wed Apr 09 12:52:09 PDT 2003
>Last-Modified:  Wed Apr 09 12:52:09 PDT 2003
>Originator:     Philip Paeps
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD juno.home.paeps.cx 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Fri Mar 7 16:34:21 CET 2003 philip@juno.home.paeps.cx:/usr/obj/usr/src/sys/JUNO i386

>Description:
	
	Port refuses to compile on -CURRENT after <sys/dkstat.h> was
	deprecated a few weeks ago.  This patch tests the __FreeBSD_version
	macro and uses <sys/resource.h> after 500101.

>How-To-Repeat:
	
	Try to compile sysutils/wmcpuload on -CURRENT after 2003-02-16.

>Fix:

	Put the patch below in sysutils/wmcpuload/files in the ports-tree.  It
	fixes the port's src/cpu_freebsd.c file where the deprecated header
	was included.

	I've CC:ed this PR to Seiichi SATO, the author of wmcpuload according
	to pkg-descr.  Perhaps the patch can be included in a next version of
	the program?

--- src/cpu_freebsd.c.orig	Fri Mar  7 22:17:29 2003
+++ src/cpu_freebsd.c	Fri Mar  7 22:18:27 2003
@@ -18,7 +18,14 @@
 
 #include <kvm.h>
 #include <fcntl.h>
-#include <sys/dkstat.h>
+
+#include <sys/param.h>
+
+#if __FreeBSD_version < 500101
+#	include <sys/dkstat.h>
+#else
+#	include <sys/resource.h>
+#endif /* __FreeBSD_version < 500101 */
 
 static kvm_t *kd = NULL;
 static struct nlist nlst[] = { {"_cp_time"}, {0} };
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->pat 
Responsible-Changed-By: leeym 
Responsible-Changed-When: Tue Apr 8 22:46:45 PDT 2003 
Responsible-Changed-Why:  
Over to the maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=49016 
State-Changed-From-To: open->closed 
State-Changed-By: pat 
State-Changed-When: Wed Apr 9 12:51:43 PDT 2003 
State-Changed-Why:  
Update to 1.01 took care of it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=49016 
>Unformatted:
