diff --git a/sys/compat/freebsd32/freebsd32_ipc.h b/sys/compat/freebsd32/freebsd32_ipc.h index ac469585cafe..d1fa7f1cf8ca 100644 --- a/sys/compat/freebsd32/freebsd32_ipc.h +++ b/sys/compat/freebsd32/freebsd32_ipc.h @@ -181,6 +181,12 @@ struct shmid_ds32_old { uint32_t shm_internal; }; +union semun_old32 { + int val; + uint32_t buf; + uint32_t array; +}; + void freebsd32_ipcperm_old_in(struct ipc_perm32_old *ip32, struct ipc_perm *ip); void freebsd32_ipcperm_old_out(struct ipc_perm *ip, diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 34ba0974c9b9..c3a7dd241c47 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -1171,7 +1171,7 @@ struct freebsd7_freebsd32_semctl_args { char semid_l_[PADL_(int)]; int semid; char semid_r_[PADR_(int)]; char semnum_l_[PADL_(int)]; int semnum; char semnum_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; - char arg_l_[PADL_(union semun32 *)]; union semun32 * arg; char arg_r_[PADR_(union semun32 *)]; + char arg_l_[PADL_(union semun_old32 *)]; union semun_old32 * arg; char arg_r_[PADR_(union semun_old32 *)]; }; struct freebsd7_freebsd32_msgctl_args { char msqid_l_[PADL_(int)]; int msqid; char msqid_r_[PADR_(int)]; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 81ed039a4195..d9feba7aef0e 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -420,7 +420,7 @@ 220 AUE_SEMCTL COMPAT7|NOSTD { int freebsd32_semctl( \ int semid, int semnum, \ - int cmd, union semun32 *arg); } + int cmd, union semun_old32 *arg); } 221 AUE_SEMGET NOSTD|NOPROTO { int semget(key_t key, int nsems, \ int semflg); } 222 AUE_SEMOP NOSTD|NOPROTO { int semop(int semid, \ diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index dd8925246d1e..274226481fa7 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -1870,7 +1870,7 @@ freebsd7_freebsd32_semctl(struct thread *td, struct semid_ds32_old dsbuf32; struct semid_ds dsbuf; union semun semun; - union semun32 arg; + union semun_old32 arg; register_t rval; int error;