types: Avoid compound literals as initializers.
Older GCC can't cope.
Reported-by: Guoshuai Li
Reported-by: Vishal Deep Ajmera
Reported-by: Terry Wilson
@@ -170,7 +170,7 @@ struct eth_addr {
/* Ethernet address constant, e.g. ETH_ADDR_C(01,23,45,67,89,ab) is
* 01:23:45:67:89:ab. */
-#define ETH_ADDR_C(A,B,C,D,E,F) (struct eth_addr) \
+#define ETH_ADDR_C(A,B,C,D,E,F) \
{ { .ea = { 0x##A, 0x##B, 0x##C, 0x##D, 0x##E, 0x##F } } }
/* Similar to struct eth_addr, for EUI-64 addresses. */
@@ -183,7 +183,7 @@ struct eth_addr64 {
/* EUI-64 address constant, e.g. ETH_ADDR_C(01,23,45,67,89,ab,cd,ef) is
* 01:23:45:67:89:ab:cd:ef. */
-#define ETH_ADDR64_C(A,B,C,D,E,F,G,H) (struct eth_addr64) \
+#define ETH_ADDR64_C(A,B,C,D,E,F,G,H) \
{ { .ea64 = { 0x##A, 0x##B, 0x##C, 0x##D, \
0x##E, 0x##F, 0x##G, 0x##H} } }
