Update for rfork removal.

Ok sthen@
This commit is contained in:
nigel 2012-04-14 09:27:27 +00:00
parent 22f06860bc
commit de366fb0d5
2 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.63 2012/01/26 08:03:57 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.64 2012/04/14 09:27:27 nigel Exp $
SHARED_ONLY= Yes
@ -9,8 +9,8 @@ V= 2.3.5
DISTNAME= gkrellm-${V}
PKGNAME-main= gkrellm-server-${V}
PKGNAME-client= gkrellm-${V}
REVISION-main= 3
REVISION-client=1
REVISION-main= 4
REVISION-client=2
CATEGORIES= sysutils sysutils/gkrellm
HOMEPAGE= http://www.gkrellm.net/

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-src_sysdeps_openbsd_c,v 1.18 2011/07/06 12:50:15 jasper Exp $
$OpenBSD: patch-src_sysdeps_openbsd_c,v 1.19 2012/04/14 09:27:27 nigel Exp $
Adapt to new OpenBSD kinfo_proc API.
--- src/sysdeps/openbsd.c.orig Tue Oct 5 18:31:00 2010
+++ src/sysdeps/openbsd.c Wed Jul 6 14:34:42 2011
--- src/sysdeps/openbsd.c.orig Tue Oct 5 17:31:00 2010
+++ src/sysdeps/openbsd.c Sat Apr 14 01:36:30 2012
@@ -62,85 +62,96 @@ gkrellm_sys_main_cleanup(void)
/* ===================================================================== */
/* CPU monitor interface */
@ -143,7 +143,7 @@ Adapt to new OpenBSD kinfo_proc API.
- n_forks = i;
+ len = sizeof(forkstat);
+ if (sysctl(fork_mib, 2, &forkstat, &len, NULL, 0) >= 0) {
+ n_forks = forkstat.cntfork + forkstat.cntvfork + forkstat.cntrfork;
+ n_forks = forkstat.cntfork + forkstat.cntvfork;
}
if (getloadavg(&avenrun, 1) <= 0)