Message ID | 20180926231140.9550-1-blp@ovn.org |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] ofproto: Fix build with some GCC versions. | expand |
> On Sep 26, 2018, at 4:11 PM, Ben Pfaff <blp@ovn.org> wrote: > > GCC 4.8.x and possibly other versions don't like a designated initializer > for an anonymous struct, see e.g. > https://travis-ci.org/openvswitch/ovs/jobs/433747674 > > Fixes: f836888d28ec ("ofproto: Handle OpenFlow version mismatch for requestforward with groups.") > Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org> --Justin
On Wed, Sep 26, 2018 at 11:04:13PM -0700, Justin Pettit wrote: > > > On Sep 26, 2018, at 4:11 PM, Ben Pfaff <blp@ovn.org> wrote: > > > > GCC 4.8.x and possibly other versions don't like a designated initializer > > for an anonymous struct, see e.g. > > https://travis-ci.org/openvswitch/ovs/jobs/433747674 > > > > Fixes: f836888d28ec ("ofproto: Handle OpenFlow version mismatch for requestforward with groups.") > > Signed-off-by: Ben Pfaff <blp@ovn.org> > > Acked-by: Justin Pettit <jpettit@ovn.org> Thanks, applied to master and branch-2.10.
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index a8cc4751f8c9..0f8d74747851 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -7393,13 +7393,12 @@ ofproto_group_mod_finish(struct ofproto *ofproto, remove_groups_postponed(&ogm->old_groups); if (req) { - struct ofputil_requestforward rf = { - .xid = req->request->xid, - .reason = OFPRFR_GROUP_MOD, - .group_mod = &ogm->gm, - .new_buckets = new_group ? &new_group->buckets : NULL, - .group_existed = group_collection_n(&ogm->old_groups) > 0, - }; + struct ofputil_requestforward rf; + rf.xid = req->request->xid; + rf.reason = OFPRFR_GROUP_MOD; + rf.group_mod = &ogm->gm; + rf.new_buckets = new_group ? &new_group->buckets : NULL; + rf.group_existed = group_collection_n(&ogm->old_groups) > 0; connmgr_send_requestforward(ofproto->connmgr, req->ofconn, &rf); } }
GCC 4.8.x and possibly other versions don't like a designated initializer for an anonymous struct, see e.g. https://travis-ci.org/openvswitch/ovs/jobs/433747674 Fixes: f836888d28ec ("ofproto: Handle OpenFlow version mismatch for requestforward with groups.") Signed-off-by: Ben Pfaff <blp@ovn.org> --- ofproto/ofproto.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)