summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libkvm/kvm_proc.c5
-rw-r--r--sys/sys/proc.h9
2 files changed, 11 insertions, 3 deletions
diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c
index 604e91f163e..9024bbe0542 100644
--- a/lib/libkvm/kvm_proc.c
+++ b/lib/libkvm/kvm_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kvm_proc.c,v 1.32 2007/04/12 22:14:15 tedu Exp $ */
+/* $OpenBSD: kvm_proc.c,v 1.33 2007/04/14 11:06:43 espie Exp $ */
/* $NetBSD: kvm_proc.c,v 1.30 1999/03/24 05:50:50 mrg Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
#if 0
static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93";
#else
-static char *rcsid = "$OpenBSD: kvm_proc.c,v 1.32 2007/04/12 22:14:15 tedu Exp $";
+static char *rcsid = "$OpenBSD: kvm_proc.c,v 1.33 2007/04/14 11:06:43 espie Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -84,6 +84,7 @@ static char *rcsid = "$OpenBSD: kvm_proc.c,v 1.32 2007/04/12 22:14:15 tedu Exp $
* most other applications are interested only in open/close/read/nlist).
*/
+#define __need_process
#include <sys/param.h>
#include <sys/user.h>
#include <sys/proc.h>
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index f0621d493ac..69000c22879 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.h,v 1.95 2007/04/12 22:14:15 tedu Exp $ */
+/* $OpenBSD: proc.h,v 1.96 2007/04/14 11:06:43 espie Exp $ */
/* $NetBSD: proc.h,v 1.44 1996/04/22 01:23:21 christos Exp $ */
/*-
@@ -50,6 +50,9 @@
#ifdef __HAVE_CPUINFO
#define curproc curcpu()->ci_curproc
#endif
+#ifdef _KERNEL
+#define __need_process
+#endif
/*
* One structure allocated per session.
@@ -126,6 +129,7 @@ extern int nemuls; /* Number of emuls */
* shared by all threads in a process, while struct proc contains the
* run-time information needed by threads.
*/
+#ifdef __need_process
struct process {
/*
* ps_mainproc is the main thread in the process.
@@ -141,6 +145,9 @@ struct process {
TAILQ_HEAD(,proc) ps_threads; /* Threads in this process. */
};
+#else
+struct process;
+#endif
struct proc {
struct proc *p_forw; /* Doubly-linked run/sleep queue. */