Thread (2 messages) 2 messages, 2 authors, 2026-01-12

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

From: Thomas Weißschuh <hidden>
Date: 2026-01-12 13:33:44
Also in: linux-api, lkml

On Mon, Jan 12, 2026 at 02:25:25PM +0100, Florian Weimer wrote:
* Thomas Weißschuh:
quoted
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.
The currently supported baseline for UAPI headers is C90.
We can't really force userspace to switch here.


Thomas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help