aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/gpxe/in.h4
-rw-r--r--src/include/gpxe/open.h2
-rw-r--r--src/include/gpxe/resolv.h2
-rw-r--r--src/include/gpxe/socket.h2
-rw-r--r--src/include/gpxe/tcpip.h2
-rw-r--r--src/include/gpxe/udp.h1
6 files changed, 6 insertions, 7 deletions
diff --git a/src/include/gpxe/in.h b/src/include/gpxe/in.h
index 40e4d4073..831a6110f 100644
--- a/src/include/gpxe/in.h
+++ b/src/include/gpxe/in.h
@@ -71,7 +71,7 @@ struct sockaddr_in {
char pad[ sizeof ( struct sockaddr ) - sizeof ( sa_family_t )
- sizeof ( uint16_t )
- sizeof ( struct in_addr ) ];
-};
+} __attribute__ (( may_alias ));
/**
* IPv6 socket address
@@ -87,7 +87,7 @@ struct sockaddr_in6 {
uint32_t sin6_flowinfo; /* Flow number */
struct in6_addr sin6_addr; /* 128-bit destination address */
uint32_t sin6_scope_id; /* Scope ID */
-};
+} __attribute__ (( may_alias ));
extern int inet_aton ( const char *cp, struct in_addr *inp );
extern char * inet_ntoa ( struct in_addr in );
diff --git a/src/include/gpxe/open.h b/src/include/gpxe/open.h
index beab0a1f7..81d5fc246 100644
--- a/src/include/gpxe/open.h
+++ b/src/include/gpxe/open.h
@@ -9,10 +9,10 @@
#include <stdarg.h>
#include <gpxe/tables.h>
+#include <gpxe/socket.h>
struct xfer_interface;
struct uri;
-struct sockaddr;
/** Location types */
enum {
diff --git a/src/include/gpxe/resolv.h b/src/include/gpxe/resolv.h
index 7c1ee6e20..e73c82011 100644
--- a/src/include/gpxe/resolv.h
+++ b/src/include/gpxe/resolv.h
@@ -10,8 +10,8 @@
#include <gpxe/refcnt.h>
#include <gpxe/interface.h>
#include <gpxe/tables.h>
+#include <gpxe/socket.h>
-struct sockaddr;
struct resolv_interface;
/** Name resolution interface operations */
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 */
diff --git a/src/include/gpxe/tcpip.h b/src/include/gpxe/tcpip.h
index c0fadd23d..9bc3cc4a7 100644
--- a/src/include/gpxe/tcpip.h
+++ b/src/include/gpxe/tcpip.h
@@ -40,7 +40,7 @@ struct sockaddr_tcpip {
*/
char pad[ sizeof ( struct sockaddr ) -
( sizeof ( sa_family_t ) + sizeof ( uint16_t ) ) ];
-};
+} __attribute__ (( may_alias ));
/**
* A transport-layer protocol of the TCP/IP stack (eg. UDP, TCP, etc)
diff --git a/src/include/gpxe/udp.h b/src/include/gpxe/udp.h
index cb0e44ebe..e515f6503 100644
--- a/src/include/gpxe/udp.h
+++ b/src/include/gpxe/udp.h
@@ -15,7 +15,6 @@
#include <gpxe/if_ether.h>
struct xfer_interface;
-struct sockaddr;
/**
* UDP constants