Re: [PATCH net-next] net: uapi: Provide an UAPI definition of 'struct sockaddr'
From: Florian Weimer <hidden>
Date: 2026-01-12 13:25:36
Also in:
lkml, netdev
From: Florian Weimer <hidden>
Date: 2026-01-12 13:25:36
Also in:
lkml, netdev
* Thomas Weißschuh:
quoted
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. Thanks, Florian