Networking: IAR compiler does not tolerate empty unions

This commit is contained in:
Kha Vo 2016-04-08 14:13:23 -06:00 committed by Gregory Nutt
parent e0a4221fe0
commit 20acc13393

View File

@ -100,6 +100,7 @@
typedef uint16_t net_ipv6addr_t[8]; typedef uint16_t net_ipv6addr_t[8];
#if defined(CONFIG_NET_IPv4) || defined(CONFIG_NET_IPv6)
/* Describes and address in either the IPv4 or IPv6 domain */ /* Describes and address in either the IPv4 or IPv6 domain */
union ip_addr_u union ip_addr_u
@ -116,7 +117,9 @@ union ip_addr_u
net_ipv6addr_t ipv6; net_ipv6addr_t ipv6;
#endif #endif
}; };
#endif
#if defined(CONFIG_NET_IPv4) || defined(CONFIG_NET_IPv6)
/* Describes address binding for a PF_INET or PF_INET6 socket */ /* Describes address binding for a PF_INET or PF_INET6 socket */
union ip_binding_u union ip_binding_u
@ -145,6 +148,7 @@ union ip_binding_u
} ipv6; } ipv6;
#endif /* CONFIG_NET_IPv6 */ #endif /* CONFIG_NET_IPv6 */
}; };
#endif
#ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv4
/* The IPv4 header */ /* The IPv4 header */