From eaa67ba8d5863be1503506cefa234fa0830f8c90 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 27 Mar 2012 15:57:52 -0700 Subject: [PATCH] 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 --- utilities/ovs-vsctl.c | 2 +- vswitchd/automake.mk | 4 ++++ vswitchd/bridge.c | 2 +- vswitchd/ovs-vswitchd.c | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index 86889cc3c..0caf57e8e 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 4df5f22cb..9092129b0 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 177822702..e15d57b68 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 ebac1aa5c..f7ddee1d6 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); -- 2.20.1