summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/socket.h
diff options
context:
space:
mode:
authorMichael Brown2009-01-06 04:19:23 +0100
committerMichael Brown2009-01-06 04:20:26 +0100
commit85e5e25c52834788239eb8b6c94e0d3aeddd2705 (patch)
tree0e4d282d413a18f3365846e35830645c2580bacd /src/include/gpxe/socket.h
parent[efi] Inhibit harmless ld warning on unresolved symbol check (diff)
downloadipxe-85e5e25c52834788239eb8b6c94e0d3aeddd2705.tar.gz
ipxe-85e5e25c52834788239eb8b6c94e0d3aeddd2705.tar.xz
ipxe-85e5e25c52834788239eb8b6c94e0d3aeddd2705.zip
[build] Avoid strict-aliasing warnings when building with gcc 4.4
Conventional usage of the various struct sockaddr_xxx types involves liberal use of casting, which tends to trigger strict-aliasing warnings from gcc. Avoid these now and in future by marking all the relevant types with __attribute__((may_alias)).
Diffstat (limited to 'src/include/gpxe/socket.h')
-rw-r--r--src/include/gpxe/socket.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/gpxe/socket.h b/src/include/gpxe/socket.h
index 582de4ef9..b683bed65 100644
--- a/src/include/gpxe/socket.h
+++ b/src/include/gpxe/socket.h
@@ -94,6 +94,6 @@ struct sockaddr {
* family.
*/
char pad[ SA_LEN - sizeof ( sa_family_t ) ];
-};
+} __attribute__ (( may_alias ));
#endif /* _GPXE_SOCKET_H */