diff options
author | Ben Pfaff <blp@ovn.org> | 2017-11-30 09:45:11 -0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-11-30 09:45:11 -0800 |
commit | 78ab5d9a81cf5fc21e43c833c658e01289f10503 (patch) | |
tree | 4da693d9fad2e15b6ba71ecc4058b50cb162d633 /include | |
parent | a80dd094b657725b77e8ba2e05f8bf62d4ae2fbb (diff) | |
download | openvswitch-78ab5d9a81cf5fc21e43c833c658e01289f10503.tar.gz |
types: Avoid compound literals as initializers.
Older GCC can't cope.
Reported-by: Guoshuai Li <ligs@dtdream.com>
Reported-by: Vishal Deep Ajmera <vishal.deep.ajmera@ericsson.com>
Reported-by: Terry Wilson <twilson@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/openvswitch/types.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/openvswitch/types.h b/include/openvswitch/types.h index d5792c3b2..b8b4fa9ca 100644 --- a/include/openvswitch/types.h +++ b/include/openvswitch/types.h @@ -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} } } |