Skip to content

Commit

Permalink
ofproto: Fix build with some GCC versions.
Browse files Browse the repository at this point in the history
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: f836888 ("ofproto: Handle OpenFlow version mismatch for requestforward with groups.")
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
  • Loading branch information
blp committed Sep 27, 2018
1 parent 07706c5 commit d31ac3b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions ofproto/ofproto.c
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit d31ac3b

Please sign in to comment.