diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 1d5d7329692..32ed17c0fe2 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1646,14 +1646,18 @@ pipe_free_kmem(struct pipe *cpipe) static void pipeclose(struct pipe *cpipe) { +#ifdef MAC struct pipepair *pp; +#endif struct pipe *ppipe; KASSERT(cpipe != NULL, ("pipeclose: cpipe == NULL")); PIPE_LOCK(cpipe); pipelock(cpipe, 0); +#ifdef MAC pp = cpipe->pipe_pair; +#endif /* * If the other side is blocked, wake it up saying that diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index 4e752fa6b66..774b317c6ec 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -597,7 +597,9 @@ soaio_process_job(struct socket *so, struct sockbuf *sb, struct kaiocb *job) { struct ucred *td_savedcred; struct thread *td; - struct file *fp; +#ifdef MAC + struct file *fp = job->fd_file; +#endif size_t cnt, done, job_total_nbytes __diagused; long ru_before; int error, flags; @@ -605,7 +607,6 @@ soaio_process_job(struct socket *so, struct sockbuf *sb, struct kaiocb *job) SOCKBUF_UNLOCK(sb); aio_switch_vmspace(job); td = curthread; - fp = job->fd_file; retry: td_savedcred = td->td_ucred; td->td_ucred = job->cred;