Ensure that struct sockaddr is long enough...

This commit is contained in:
Michael Brown
2007-01-18 03:28:29 +00:00
parent 9828181e3b
commit 8ffbbebf11
2 changed files with 12 additions and 4 deletions

View File

@@ -21,9 +21,6 @@ struct net_device;
*/
#define TCPIP_EMPTY_CSUM 0xffff
/** Length of a @c struct @c sockaddr_tcpip */
#define SA_TCPIP_LEN 32
/**
* TCP/IP socket address
*
@@ -41,7 +38,8 @@ struct sockaddr_tcpip {
* enough to hold a socket address for any TCP/IP address
* family.
*/
char pad[SA_TCPIP_LEN - sizeof ( sa_family_t ) - sizeof ( uint16_t )];
char pad[ sizeof ( struct sockaddr ) -
( sizeof ( sa_family_t ) + sizeof ( uint16_t ) ) ];
};
/**