]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - misc/sys/cdefs.h
socket: Use may_alias on sockaddr structs (bug 19622)
[thirdparty/glibc.git] / misc / sys / cdefs.h
index 2e8279a2c794eec268886190c95bbfd8f7701272..ab9620bd0de05b5f2753d12ddbb37d5ecf28b499 100644 (file)
@@ -874,4 +874,13 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
 # define __attribute_returns_twice__ /* Ignore.  */
 #endif
 
+/* Mark struct types as aliasable.  Restricted to compilers that
+   support forward declarations of structs in the presence of the
+   attribute.  */
+#if __GNUC_PREREQ (7, 1) || defined __clang__
+# define __attribute_struct_may_alias__ __attribute__ ((__may_alias__))
+#else
+# define __attribute_struct_may_alias__
+#endif
+
 #endif  /* sys/cdefs.h */