# Re: \[PATCH net-next\] net: uapi: Provide an UAPI definition of 'struct sockaddr'

- From: Jakub Kicinski \<kuba@kernel.org\>
- Date: 2026-01-05 17:57:14 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2026/01/3353468
- Thread: https://ratatoskr.run/netdev/2026/01/3352392/t.md

```text
On Mon, 05 Jan 2026 09:25:55 +0100 Thomas Weißschuh wrote:
> Various UAPI headers reference 'struct sockaddr'. Currently the
> definition of this struct is pulled in from the libc header
> sys/socket.h. This is problematic as it introduces a dependency
> on a full userspace toolchain.
> 
> Instead expose a custom but compatible definition of 'struct sockaddr'
> in the UAPI headers. It is guarded by the libc compatibility
> infrastructure to avoid potential conflicts.
> 
> The compatibility symbol won't be supported by glibc right away,
> but right now __UAPI_DEF_IF_IFNAMSIZ is not supported either,
> so including the libc headers before the UAPI headers is broken anyways.

I did not look too closely but this seems to break build of selftests
in netdev and BPF CI (netdev on AWS Linux, not sure what base BPF uses)
```
