2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

ofp-actions: Fix build on earlier GCC.

GCC4.4 gets confused by anonymous fields + flexible fields, complains:
lib/ofp-actions.h:510: error: flexible array member in otherwise empty
struct
lib/ofp-actions.h:512: error: bit-field ‘build_assert_failed’ width not
an integer constant
lib/ofp-actions.h:514: error: bit-field ‘build_assert_failed’ width not
an integer constant

Fix the problem by specifying the actions length as zero.

Reported-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
This commit is contained in:
Joe Stringer
2015-10-16 15:31:59 -07:00
parent 419e9afa44
commit c7e69808bd

View File

@@ -507,7 +507,7 @@ struct ofpact_conntrack {
CT_MEMBERS;
uint8_t pad[OFPACT_ALIGN(sizeof(CT_MEMBERS))];
};
struct ofpact actions[];
struct ofpact actions[0];
};
BUILD_ASSERT_DECL(offsetof(struct ofpact_conntrack, actions)
% OFPACT_ALIGNTO == 0);