From: Ben Pfaff Date: Tue, 27 Mar 2012 22:57:52 +0000 (-0700) Subject: Avoid possibly including an old vswitch-idl.h. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eaa67ba8d5863be1503506cefa234fa0830f8c90;p=openvswitch Avoid possibly including an old vswitch-idl.h. Codes that uses #include "vswitch-idl.h" can get an older version of this header, because this header file moved from vswitchd/ to lib/ and the older generated file might still be present. This helps out two ways: * "make clean" will delete the generated files from their old locations. * Use #include "lib/vswitch-idl.h" to explicitly avoid including the files from their old locations. Reported-by: Justin Pettit Signed-off-by: Ben Pfaff --- diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index 86889cc3..0caf57e8 100644 --- a/utilities/ovs-vsctl.c +++ b/utilities/ovs-vsctl.c @@ -41,7 +41,7 @@ #include "stream-ssl.h" #include "sset.h" #include "svec.h" -#include "vswitch-idl.h" +#include "lib/vswitch-idl.h" #include "table.h" #include "timeval.h" #include "util.h" diff --git a/vswitchd/automake.mk b/vswitchd/automake.mk index 4df5f22c..9092129b 100644 --- a/vswitchd/automake.mk +++ b/vswitchd/automake.mk @@ -95,3 +95,7 @@ vswitchd/vswitch.ovsschema.stamp: vswitchd/vswitch.ovsschema exit 1; \ fi CLEANFILES += vswitchd/vswitch.ovsschema.stamp + +# Clean up generated files from older OVS versions. (This is important so that +# #include "vswitch-idl.h" doesn't get the wrong copy.) +CLEANFILES += vswitchd/vswitch-idl.c vswitchd/vswitch-idl.h diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 17782270..e15d57b6 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -50,7 +50,7 @@ #include "util.h" #include "unixctl.h" #include "vlandev.h" -#include "vswitch-idl.h" +#include "lib/vswitch-idl.h" #include "xenserver.h" #include "vlog.h" #include "sflow_api.h" diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c index ebac1aa5..f7ddee1d 100644 --- a/vswitchd/ovs-vswitchd.c +++ b/vswitchd/ovs-vswitchd.c @@ -49,7 +49,7 @@ #include "util.h" #include "vconn.h" #include "vlog.h" -#include "vswitch-idl.h" +#include "lib/vswitch-idl.h" VLOG_DEFINE_THIS_MODULE(vswitchd);