]> git.ipfire.org Git - thirdparty/glibc.git/commit
socket: Use may_alias on sockaddr structs (bug 19622)
authorFlorian Weimer <fweimer@redhat.com>
Sat, 18 May 2024 07:33:19 +0000 (09:33 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Sat, 18 May 2024 07:33:19 +0000 (09:33 +0200)
commit8d7b6b4cb27d4dec1dd5f7960298c1699275f962
treed3233e6a49dbde86dee8ea46920714a1adbbddb7
parent2a99e2398d9d717c034e915f7846a49e623f5450
socket: Use may_alias on sockaddr structs (bug 19622)

This supports common coding patterns.  The GCC C front end before
version 7 rejects the may_alias attribute on a struct definition
if it was not present in a previous forward declaration, so this
attribute can only be conditionally applied.

This implements the spirit of the change in Austin Group issue 1641.

Suggested-by: Marek Polacek <polacek@redhat.com>
Suggested-by: Jakub Jelinek <jakub@redhat.com>
Reviewed-by: Sam James <sam@gentoo.org>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
bits/socket.h
inet/netinet/in.h
misc/sys/cdefs.h
socket/sys/un.h
sysdeps/mach/hurd/bits/socket.h
sysdeps/unix/sysv/linux/bits/socket.h
sysdeps/unix/sysv/linux/net/if_packet.h
sysdeps/unix/sysv/linux/netash/ash.h
sysdeps/unix/sysv/linux/neteconet/ec.h
sysdeps/unix/sysv/linux/netiucv/iucv.h