summaryrefslogtreecommitdiff
path: root/sys/kern/sysv_shm.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-05-03 17:38:49 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-05-03 17:38:49 +0000
commit7ee12b987c71eed938605394f2489b79a5bddd78 (patch)
treec476ccbe6a8e1e76cd7563cd6d01810d4fff3351 /sys/kern/sysv_shm.c
parentca3f78ca5742c4bebeeeebecaa0d76df2987c4f7 (diff)
POSIX says the length parameter for semop(2) and shmget(2) should be size_t.
Create new syscalls with the correct parameters and add compat versions for the old ones under COMPAT_35.
Diffstat (limited to 'sys/kern/sysv_shm.c')
-rw-r--r--sys/kern/sysv_shm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c
index 046c3bc2481..ff614d7655e 100644
--- a/sys/kern/sysv_shm.c
+++ b/sys/kern/sysv_shm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysv_shm.c,v 1.42 2004/04/16 17:55:13 tedu Exp $ */
+/* $OpenBSD: sysv_shm.c,v 1.43 2004/05/03 17:38:48 millert Exp $ */
/* $NetBSD: sysv_shm.c,v 1.50 1998/10/21 22:24:29 tron Exp $ */
/*
@@ -384,8 +384,9 @@ shmget_allocate_segment(struct proc *p,
} */ *uap,
int mode, register_t *retval)
{
+ size_t size;
key_t key;
- int segnum, size;
+ int segnum;
struct ucred *cred = p->p_ucred;
struct shmid_ds *shmseg;
struct shm_handle *shm_handle;
@@ -457,7 +458,7 @@ sys_shmget(struct proc *p, void *v, register_t *retval)
{
struct sys_shmget_args /* {
syscallarg(key_t) key;
- syscallarg(int) size;
+ syscallarg(size_t) size;
syscallarg(int) shmflg;
} */ *uap = v;
int segnum, mode, error;