Make things work on OpenBSD 2.6; this is basically the same than on

2001-02-14  Martin Baulig  <baulig@suse.de>

	* proctime.c (glibtop_get_proc_time_p): Make things work on
	OpenBSD 2.6; this is basically the same than on NetBSD.
This commit is contained in:
Martin Baulig
2001-02-14 21:36:42 +00:00
committed by Martin Baulig
parent 9d772e3c07
commit 0a42a8d018
2 changed files with 7 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
2001-02-14 Martin Baulig <baulig@suse.de>
* proctime.c (glibtop_get_proc_time_p): Make things work on
OpenBSD 2.6; this is basically the same than on NetBSD.
2000-02-13 Martin Baulig <martin@home-of-linux.org>
* *.c: kvm_nlist () returns -1 on error, but a positive return value

View File

@@ -124,7 +124,7 @@ glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
pid_t pid)
{
struct kinfo_proc *pinfo;
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
#if (defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)) || (defined(OpenBSD) && (OpenBSD >= 199912))
register struct rusage *rup;
#else
struct user *u_addr = (struct user *)USRSTACK;
@@ -166,7 +166,7 @@ glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
buf->frequency = 1000000;
buf->flags = _glibtop_sysdeps_proc_time;
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
#if (defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)) || (defined(OpenBSD) && (OpenBSD >= 199912))
glibtop_suid_enter (server);
if (kvm_read (server->machine.kd,