Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 2026 10:49:42 -0500
From:      Mark Johnston <markj@freebsd.org>
To:        Ian FREISLICH <ianfreislich@gmail.com>
Cc:        FreeBSD Current <current@freebsd.org>
Subject:   Re: Buildkernel failure (error: declaration of 'struct socket' will not be visible outside of this function)
Message-ID:  <aY32lmV6FTMlHHxQ@nuc>
In-Reply-To: <4bbe4798-867d-4a08-8fb2-4c0b0b4b9f13@gmail.com>
References:  <742828d8-926a-4564-8f22-8cda1169f7cd@gmail.com> <aY3jeDgzCZCmgldP@nuc> <4bbe4798-867d-4a08-8fb2-4c0b0b4b9f13@gmail.com>

index | next in thread | previous in thread | raw e-mail

On Thu, Feb 12, 2026 at 10:22:36AM -0500, Ian FREISLICH wrote:
> On 2/12/26 09:28, Mark Johnston wrote:
> > On Wed, Feb 11, 2026 at 03:25:26PM -0500, Ian FREISLICH wrote:
> > > Hi
> > > 
> > > In file included from /usr/src/sys/netpfil/pf/pfsync_nv.c:38:
> > > /usr/src/sys/netinet6/ip6_var.h:380:28: error: declaration of 'struct
> > > socket' will not be visible outside of this function [-Werror,-Wvisibility]
> > >    380 | int     icmp6_ctloutput(struct socket *, struct sockopt *sopt);
> > >        |                                ^
> > > /usr/src/sys/netinet6/ip6_var.h:409:26: error: declaration of 'struct
> > > socket' will not be visible outside of this function [-Werror,-Wvisibility]
> > >    409 | int     ip6_ctloutput(struct socket *, struct sockopt *);
> > >        |                              ^
> > > /usr/src/sys/netinet6/ip6_var.h:410:30: error: declaration of 'struct
> > > socket' will not be visible outside of this function [-Werror,-Wvisibility]
> > >    410 | int     ip6_raw_ctloutput(struct socket *, struct sockopt *);
> > >        |                                  ^
> > > /usr/src/sys/netinet6/ip6_var.h:429:27: error: declaration of 'struct
> > > socket' will not be visible outside of this function [-Werror,-Wvisibility]
> > >    429 | int     rip6_ctloutput(struct socket *, struct sockopt *);
> > >        |                               ^
> > > /usr/src/sys/netinet6/ip6_var.h:430:24: error: declaration of 'struct
> > > socket' will not be visible outside of this function [-Werror,-Wvisibility]
> > >    430 | int     rip6_usrreq(struct socket *,
> > >        |                            ^
> > > 5 errors generated.
> > 
> > I think you're using a custom kernel config, please share it when
> > reporting build failures.  In any case, I think commit
> > be393b6f0497f374c679c31e746705515eb9a554 will fix the problem.
> 
> That fixes the problem. Out of interest what option would have included the
> struct socket definition?

I suspect it's "options VIMAGE".


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aY32lmV6FTMlHHxQ>