From owner-freebsd-ports Fri Nov 8 18:03:16 1996 Return-Path: owner-ports Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA28330 for ports-outgoing; Fri, 8 Nov 1996 18:03:16 -0800 (PST) Received: from vader.cs.berkeley.edu (vader.CS.Berkeley.EDU [128.32.38.234]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id SAA28319; Fri, 8 Nov 1996 18:03:12 -0800 (PST) Received: (from asami@localhost) by vader.cs.berkeley.edu (8.8.2/8.7.3) id SAA03500; Fri, 8 Nov 1996 18:02:58 -0800 (PST) Date: Fri, 8 Nov 1996 18:02:58 -0800 (PST) Message-Id: <199611090202.SAA03500@vader.cs.berkeley.edu> To: joerg_wunsch@uriah.heep.sax.de CC: jmz@freebsd.org, ports@freebsd.org, rich@freebsd.org In-reply-to: <199611082113.WAA06830@uriah.heep.sax.de> (message from J Wunsch on Fri, 8 Nov 1996 22:13:29 +0100 (MET)) Subject: Re: XFree86 contrib From: asami@freebsd.org (Satoshi Asami) Sender: owner-ports@freebsd.org X-Loop: FreeBSD.org Precedence: bulk * I'm not Rich... anyway, this already came up in the XFree86 beta * group. It's definately _not_ a kmem access problem, but rather that * xload is apparently built using the wrong options. It's not supposed * to access /dev/kmem, but should use getloadavg(3) instead (which in * turn uses sysctl(3)). Ok -- thanks for the hint. I waded my way through the spaghetti of #ifdef's and finally came up with this patch: ====== --- ./programs/xload/get_load.c.org Sat Oct 26 01:19:56 1996 +++ ./programs/xload/get_load.c Fri Nov 8 17:52:09 1996 @@ -489,6 +489,8 @@ static kvm_t *kd; static int fscale; +#ifdef __bsdi__ + void InitLoadPoint() { fixpt_t averunnable[3]; /* unused really */ @@ -979,6 +981,7 @@ #endif /* sun else */ return; } +#endif /* __bsdi__ else */ #endif /* BSD >= 199306 else */ #endif /* CSRG_BASED else */ #endif /* __osf__ else */ ======= (Hey don't laugh, it took me half an hour to make this thing compile.) It seems to work fine for me now. Please check it, I'm not sure what BSDi does (I assumed the missing #ifdef was BSDi's, because there was a "#else /* __bsdi__ */" in the middle...)... Satoshi