fix build after guenther moved some fields in struct proc from timeval
to timespec
This commit is contained in:
parent
07a2ba53be
commit
379139bf21
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.99 2013/05/21 15:11:43 naddy Exp $
|
||||
# $OpenBSD: Makefile,v 1.100 2013/06/08 13:05:13 espie Exp $
|
||||
|
||||
COMMENT= portable library for obtaining system information
|
||||
|
||||
GNOME_VERSION= 2.28.4
|
||||
GNOME_PROJECT= libgtop
|
||||
PKGNAME= libgtop2-${VERSION}
|
||||
REVISION= 9
|
||||
REVISION= 10
|
||||
|
||||
SHARED_LIBS= gtop-2.0 9.0 # .9.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-sysdeps_openbsd_proctime_c,v 1.4 2012/01/22 11:55:10 ajacoutot Exp $
|
||||
$OpenBSD: patch-sysdeps_openbsd_proctime_c,v 1.5 2013/06/08 13:05:13 espie Exp $
|
||||
|
||||
From b11aa1517e203e36a8901f03ea57c50a25dfbfc7 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@gnome.org>
|
||||
@ -6,7 +6,28 @@ Date: Sun, 22 Jan 2012 11:47:49 +0000
|
||||
Subject: OpenBSD: kinfo_proc2 -> kinfo_proc
|
||||
|
||||
--- sysdeps/openbsd/proctime.c.orig Sun Jul 24 21:13:56 2011
|
||||
+++ sysdeps/openbsd/proctime.c Mon Jan 9 18:37:24 2012
|
||||
+++ sysdeps/openbsd/proctime.c Sat Jun 8 15:00:41 2013
|
||||
@@ -71,7 +71,7 @@ calcru(struct proc *p, struct timeval *up, struct time
|
||||
{
|
||||
quad_t totusec;
|
||||
u_quad_t u, st, ut, it, tot;
|
||||
- long sec, usec;
|
||||
+ long sec, nsec;
|
||||
struct timeval tv;
|
||||
|
||||
st = p->p_sticks;
|
||||
@@ -85,9 +85,9 @@ calcru(struct proc *p, struct timeval *up, struct time
|
||||
}
|
||||
|
||||
sec = p->p_rtime.tv_sec;
|
||||
- usec = p->p_rtime.tv_usec;
|
||||
+ nsec = p->p_rtime.tv_nsec;
|
||||
|
||||
- totusec = (quad_t)sec * 1000000 + usec;
|
||||
+ totusec = (quad_t)sec * 1000000 + nsec/1000;
|
||||
|
||||
if (totusec < 0) {
|
||||
/* XXX no %qd in kernel. Truncate. */
|
||||
@@ -117,7 +117,7 @@ void
|
||||
glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
|
||||
pid_t pid)
|
||||
|
Loading…
Reference in New Issue
Block a user