Its here: #define OVS_NODES \ OVS_NODE(open_vswitch, "open_vswitch") \ OVS_NODE(bridge, "bridge") \ OVS_NODE(port, "port") \ OVS_NODE(interface, "interface") \ OVS_NODE(qos, "qos") \ OVS_NODE(queue, "queue") \ OVS_NODE(flow_sample_collector_set, "flow_sample_collector_set")
OVS_NODE(interface, "interface") \ But maybe there is a better option to avoid that issue... ________________________________ Von: Dumitru Ceara <dce...@redhat.com> Gesendet: Donnerstag, 6. März 2025 11:27 An: Frank Wagner <frank.wag...@dbosoft.eu>; d...@openvswitch.org <d...@openvswitch.org> Betreff: Re: [ovs-dev] [PATCH ovn 5/10] controller: Fix conflict with windows macro. On 3/1/25 2:55 PM, Frank Wagner wrote: > Windows declares a macro interface in its headers which conflicts with > OVS_NODE. This patch undefines the macro until the end of the file. > > > Signed-off-by: Frank Wagner <frank.wag...@dbosoft.eu> > > --- Hi Frank, Thanks for the patch! > controller/ovn-controller.c | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c > index d8d1f363e..73a7140fe 100644 > --- a/controller/ovn-controller.c > +++ b/controller/ovn-controller.c > @@ -132,6 +132,13 @@ static unixctl_cb_func debug_ignore_startup_delay; > #define OVS_NB_CFG_TS_NAME "ovn-nb-cfg-ts" > #define OVS_STARTUP_TS_NAME "ovn-startup-ts" > > +/* macro interface is already defined in Windows headers, > + undef until end of file for OVS_NODE */ > +#ifdef _WIN32 > + #pragma push_macro("interface") > + #undef interface > +#endif > + I'm confused, where do we use "interface" as a standalone name in ovn-controller? Maybe I missed it but I didn't see any case. I'd like to avoid adding "#ifdef _WIN32" in various places if we can. > struct br_int_remote { > char *target; > int probe_interval; > @@ -3709,7 +3716,7 @@ struct ed_type_lflow_output { > /* meter ids for QoS */ > struct ovn_extend_table meter_table; > /* lflow <-> resource cross reference */ > - struct objdep_mgr lflow_deps_mgr;; > + struct objdep_mgr lflow_deps_mgr; While that's a good fix, it should probably be a separate patch. > /* conjunciton ID usage information of lflows */ > struct conj_ids conj_ids; > > @@ -6994,3 +7001,8 @@ debug_ignore_startup_delay(struct unixctl_conn *conn, > int argc OVS_UNUSED, > daemon_started_recently_ignore(); > unixctl_command_reply(conn, NULL); > } > + > +/* restore macro interface from Windows headers*/ > +#ifdef _WIN32 > + #pragma pop_macro("interface") > +#endif > \ No newline at end of file No newline at end of file. :) Thanks, Dumitru _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev