diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 544ab605cb76..f92f54e22ec5 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -225,6 +225,7 @@ static struct rwlock unp_global_rwlock; #define UNP_PCB_UNLOCK(unp) mtx_unlock(&(unp)->unp_mtx) #define UNP_PCB_LOCK_ASSERT(unp) mtx_assert(&(unp)->unp_mtx, MA_OWNED) +static int uipc_connect2(struct socket *, struct socket *); static int uipc_ctloutput(struct socket *, struct sockopt *); static int unp_connect(struct socket *, struct sockaddr *, struct thread *); @@ -531,7 +532,7 @@ uipc_close(struct socket *so) /* * uipc_connect2() is not static as it is invoked directly by fifofs. */ -int +static int uipc_connect2(struct socket *so1, struct socket *so2) { struct unpcb *unp, *unp2; diff --git a/sys/sys/un.h b/sys/sys/un.h index 1452c33de222..1f4731e6e810 100644 --- a/sys/sys/un.h +++ b/sys/sys/un.h @@ -57,18 +57,13 @@ struct sockaddr_un { #define LOCAL_CREDS 0x002 /* pass credentials to receiver */ #define LOCAL_CONNWAIT 0x004 /* connects block until accepted */ -#ifdef _KERNEL - -struct socket; -int uipc_connect2(struct socket *so1, struct socket *so2); - -#else /* !_KERNEL */ +#ifndef _KERNEL /* actual length of an initialized sockaddr_un */ #define SUN_LEN(su) \ (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path)) -#endif /* _KERNEL */ +#endif /* !_KERNEL */ #endif /* __BSD_VISIBLE */