summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libkvm/kvm_proc.c3
-rw-r--r--sys/sys/ucred.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c
index d0e6517..a231942 100644
--- a/lib/libkvm/kvm_proc.c
+++ b/lib/libkvm/kvm_proc.c
@@ -52,6 +52,9 @@ static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93";
*/
#include <sys/param.h>
+#define _KERNEL
+#include <sys/ucred.h>
+#undef _KERNEL
#include <sys/user.h>
#include <sys/proc.h>
#include <sys/exec.h>
diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h
index 7a78810..60b5bd6 100644
--- a/sys/sys/ucred.h
+++ b/sys/sys/ucred.h
@@ -49,6 +49,7 @@
* Please do not inspect cr_uid directly to determine superuserness.
* Only the suser() or suser_cred() function should be used for this.
*/
+#ifdef _KERNEL
struct ucred {
u_int cr_ref; /* reference count */
#define cr_startcopy cr_uid
@@ -68,6 +69,7 @@ struct ucred {
};
#define NOCRED ((struct ucred *)0) /* no credential available */
#define FSCRED ((struct ucred *)-1) /* filesystem credential */
+#endif /* _KERNEL */
/*
* This is the external representation of struct ucred.
OpenPOWER on IntegriCloud