[ovs-dev] [PATCH] vconn: Remove unnecessary forward declarations and #includes from header.
Ben Pfaff
blp at nicira.com
Tue Oct 4 05:01:33 UTC 2011
This required fix-ups in a few other files that accidentally depended upon
vconn.h including those other headers.
---
lib/vconn.h | 10 +---------
ofproto/pinsched.c | 1 +
tests/test-vconn.c | 1 +
vswitchd/ovs-vswitchd.c | 1 +
4 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/lib/vconn.h b/lib/vconn.h
index 3c1ffe9..74b6b49 100644
--- a/lib/vconn.h
+++ b/lib/vconn.h
@@ -17,12 +17,8 @@
#ifndef VCONN_H
#define VCONN_H 1
-#include <assert.h>
#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-
-#include "flow.h"
+#include "openvswitch/types.h"
#ifdef __cplusplus
extern "C" {
@@ -30,10 +26,6 @@ extern "C" {
struct list;
struct ofpbuf;
-struct ofp_action_header;
-struct ofp_header;
-struct ofp_match;
-struct ofp_stats_msg;
struct pvconn;
struct vconn;
diff --git a/ofproto/pinsched.c b/ofproto/pinsched.c
index 695d9b4..6d7eb13 100644
--- a/ofproto/pinsched.c
+++ b/ofproto/pinsched.c
@@ -21,6 +21,7 @@
#include <arpa/inet.h>
#include <stdint.h>
#include <stdlib.h>
+#include "hash.h"
#include "hmap.h"
#include "ofpbuf.h"
#include "openflow/openflow.h"
diff --git a/tests/test-vconn.c b/tests/test-vconn.c
index 2b14fa8..42940c3 100644
--- a/tests/test-vconn.c
+++ b/tests/test-vconn.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <unistd.h>
#include "command-line.h"
+#include "openflow/openflow.h"
#include "poll-loop.h"
#include "socket-util.h"
#include "stream.h"
diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c
index 4910d69..359e3ab 100644
--- a/vswitchd/ovs-vswitchd.c
+++ b/vswitchd/ovs-vswitchd.c
@@ -34,6 +34,7 @@
#include "dummy.h"
#include "leak-checker.h"
#include "netdev.h"
+#include "openflow/openflow.h"
#include "ovsdb-idl.h"
#include "poll-loop.h"
#include "process.h"
--
1.7.2.5
More information about the dev
mailing list