In C++, 'mutable' is a keyword. If this is used as the name for a field, then C++ compilers can get confused about the context and fail to compile references to such fields. Rename the field to 'mutable_' to avoid this issue.
Signed-off-by: Joe Stringer <j...@ovn.org> --- lib/ovsdb-idl-provider.h | 2 +- lib/ovsdb-idl.c | 2 +- ovsdb/ovsdb-idlc.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ovsdb-idl-provider.h b/lib/ovsdb-idl-provider.h index 3578f89cb07c..7a28f635e804 100644 --- a/lib/ovsdb-idl-provider.h +++ b/lib/ovsdb-idl-provider.h @@ -88,7 +88,7 @@ struct ovsdb_idl_row { struct ovsdb_idl_column { char *name; struct ovsdb_type type; - bool mutable; + bool mutable_; void (*parse)(struct ovsdb_idl_row *, const struct ovsdb_datum *); void (*unparse)(struct ovsdb_idl_row *); }; diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 41f98a7df74c..19adc335fde9 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -2470,7 +2470,7 @@ bool ovsdb_idl_is_mutable(const struct ovsdb_idl_row *row, const struct ovsdb_idl_column *column) { - return column->mutable || (row->new_ && !row->old); + return column->mutable_ || (row->new_ && !row->old); } /* Returns false if 'row' was obtained from the IDL, true if it was initialized diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in index 7cbcbf5ab025..9c674e7f5e80 100755 --- a/ovsdb/ovsdb-idlc.in +++ b/ovsdb/ovsdb-idlc.in @@ -1010,7 +1010,7 @@ void .type = { %(type)s }, - .mutable = %(mutable)s, + .mutable_ = %(mutable)s, .parse = %(s)s_parse_%(c)s, .unparse = %(s)s_unparse_%(c)s, },\n""" % {'P': prefix.upper(), -- 2.13.3 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev