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

From: Florian Weimer <[email-masked]>
Date: Mon, 12 Jan 2026 14:37:15 +0100

* Thomas Weißschuh:

> On Mon, Jan 12, 2026 at 02:25:25PM +0100, Florian Weimer wrote:
>> * Thomas Weißschuh:
>> 
>> >> If you call the data member sa_data just like glibc, it will only fail
>> >> in C++, not C.  GCC considers the two definitions sufficiently
>> >> equivalent (even though glibc adds a may_alias attribute to meet POSIX
>> >> requirements), and duplicate definitions are permitted in C.
>> >
>> > clang is not so lenient and will error out.
>> 
>> It seems it accepts it if you switch to C23 mode.
>
> The currently supported baseline for UAPI headers is C90.
> We can't really force userspace to switch here.

Including libc and UAPI headers at the same time is still officially
unsupported, right?

We don't test for it, so lots of combinations do not work.

Thanks,
Florian