summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-07-10 14:16:50 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-07-10 14:16:50 +0000
commitebe9203ff413e7791631a86e14e426d2976fc7c0 (patch)
treed4612f2f1aaaa54f9e868df5c24aa39032ea356b /sys
parentc85436dfc6c19185bb232e34738680d62528569c (diff)
struct proc; and struct ucred; only needed for ipcs in kernel-grovel mode
behind #define _KERNEL (it is what it is)
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/ipc.h4
-rw-r--r--sys/sys/sem.h18
2 files changed, 13 insertions, 9 deletions
diff --git a/sys/sys/ipc.h b/sys/sys/ipc.h
index 77f17233286..57e6264ef9a 100644
--- a/sys/sys/ipc.h
+++ b/sys/sys/ipc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipc.h,v 1.11 2011/01/03 23:08:07 guenther Exp $ */
+/* $OpenBSD: ipc.h,v 1.12 2014/07/10 14:16:49 deraadt Exp $ */
/* $NetBSD: ipc.h,v 1.15 1996/02/09 18:25:12 christos Exp $ */
/*
@@ -80,6 +80,8 @@ struct ipc_perm {
#define IPCID_TO_SEQ(id) (((id) >> 16) & 0xffff)
#define IXSEQ_TO_IPCID(ix,perm) (((perm.seq) << 16) | (ix & 0xffff))
+struct ucred;
+
int ipcperm(struct ucred *, struct ipc_perm *, int);
#else /* !_KERNEL */
diff --git a/sys/sys/sem.h b/sys/sys/sem.h
index 0d6d7bdddf5..bbf509e0f05 100644
--- a/sys/sys/sem.h
+++ b/sys/sys/sem.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sem.h,v 1.21 2011/01/03 23:08:07 guenther Exp $ */
+/* $OpenBSD: sem.h,v 1.22 2014/07/10 14:16:49 deraadt Exp $ */
/* $NetBSD: sem.h,v 1.8 1996/02/09 18:25:29 christos Exp $ */
/*
@@ -175,6 +175,15 @@ extern struct seminfo seminfo;
extern struct semid_ds **sema; /* semaphore id list */
+struct proc;
+
+void seminit(void);
+void semexit(struct process *);
+int sysctl_sysvsem(int *, u_int, void *, size_t *, void *, size_t);
+int semctl1(struct proc *, int, int, int, union semun *, register_t *,
+ int (*)(const void *, void *, size_t),
+ int (*)(const void *, void *, size_t));
+
#endif /* _KERNEL */
#ifndef _KERNEL
@@ -184,13 +193,6 @@ int __semctl(int, int, int, union semun *);
int semget(key_t, int, int);
int semop(int, struct sembuf *, size_t);
__END_DECLS
-#else
-void seminit(void);
-void semexit(struct process *);
-int sysctl_sysvsem(int *, u_int, void *, size_t *, void *, size_t);
-int semctl1(struct proc *, int, int, int, union semun *, register_t *,
- int (*)(const void *, void *, size_t),
- int (*)(const void *, void *, size_t));
#endif /* !_KERNEL */
#endif /* !_SEM_H_ */