Index: sysv_shm.c =================================================================== RCS file: /usr/ncvs/src/sys/kern/sysv_shm.c,v retrieving revision 1.111 diff -u -r1.111 sysv_shm.c --- sysv_shm.c 5 Mar 2007 13:10:57 -0000 1.111 +++ sysv_shm.c 11 Feb 2008 15:49:18 -0000 @@ -638,7 +638,27 @@ int error = 0; struct shmid_ds buf; size_t bufsz; - +#if !defined(__i386__) && \ + (defined(COMPAT_FREEBSD5) || defined(COMPAT_FREEBSD6)) + struct { + int shmmax; + int shmmin; + int shmmni; + int shmseg; + int shmall; + } freebsd6_shminfo; + + if (uap->cmd == IPC_INFO && td->td_proc->p_osrel < 700000) { + freebsd6_shminfo.shmmax = shminfo.shmmax; + freebsd6_shminfo.shmmin = shminfo.shmmin; + freebsd6_shminfo.shmmni = shminfo.shmmni; + freebsd6_shminfo.shmseg = shminfo.shmseg; + freebsd6_shminfo.shmall = shminfo.shmall; + error = copyout(&freebsd6_shminfo, uap->buf, + sizeof(freebsd6_shminfo)); + return (error); + } +#endif /* IPC_SET needs to copyin the buffer before calling kern_shmctl */ if (uap->cmd == IPC_SET) { if ((error = copyin(uap->buf, &buf, sizeof(struct shmid_ds))))