summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-03-29 21:12:07 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-03-29 21:12:07 +0200
commitaa76c9ee78146f97512f96524d3abb94210040a5 (patch)
tree03084f3b49c093d0abfa1e81eb913942762f2203
parentc986fc7131d360923908546deab26717a839400d (diff)
rework includes
-rw-r--r--bridge.c2
-rw-r--r--config.c1
-rw-r--r--interface.c2
-rw-r--r--interface.h2
-rw-r--r--netifd.h6
-rw-r--r--proto.c1
-rw-r--r--system-dummy.c1
-rw-r--r--ubus.c1
8 files changed, 13 insertions, 3 deletions
diff --git a/bridge.c b/bridge.c
index 6b6562c..2a9cc28 100644
--- a/bridge.c
+++ b/bridge.c
@@ -5,6 +5,8 @@
#include <errno.h>
#include "netifd.h"
+#include "device.h"
+#include "interface.h"
#include "system.h"
struct bridge_state {
diff --git a/config.c b/config.c
index a106db2..66cee84 100644
--- a/config.c
+++ b/config.c
@@ -3,6 +3,7 @@
#include <stdio.h>
#include "netifd.h"
+#include "interface.h"
struct uci_context *uci_ctx;
diff --git a/interface.c b/interface.c
index e12d356..8be8727 100644
--- a/interface.c
+++ b/interface.c
@@ -3,6 +3,8 @@
#include <stdio.h>
#include "netifd.h"
+#include "device.h"
+#include "interface.h"
#include "proto.h"
#include "ubus.h"
diff --git a/interface.h b/interface.h
index 87a7cb3..6bd8761 100644
--- a/interface.h
+++ b/interface.h
@@ -1,6 +1,8 @@
#ifndef __NETIFD_INTERFACE_H
#define __NETIFD_INTERFACE_H
+#include "device.h"
+
struct interface;
struct interface_proto_state;
diff --git a/netifd.h b/netifd.h
index fabf4d9..17b839b 100644
--- a/netifd.h
+++ b/netifd.h
@@ -13,15 +13,15 @@
#include <libubus.h>
#include <uci.h>
-#include "device.h"
-#include "interface.h"
-
#ifdef DEBUG
#define DPRINTF(format, ...) fprintf(stderr, "%s(%d): " format, __func__, __LINE__, ## __VA_ARGS__)
#else
#define DPRINTF(...) do {} while(0)
#endif
+struct device;
+struct interface;
+
extern struct uci_context *uci_ctx;
void config_init_interfaces(const char *name);
diff --git a/proto.c b/proto.c
index a345b35..287eae5 100644
--- a/proto.c
+++ b/proto.c
@@ -3,6 +3,7 @@
#include <stdio.h>
#include "netifd.h"
+#include "interface.h"
#include "proto.h"
static void
diff --git a/system-dummy.c b/system-dummy.c
index e143d8b..aadb64f 100644
--- a/system-dummy.c
+++ b/system-dummy.c
@@ -2,6 +2,7 @@
#include <string.h>
#include "netifd.h"
+#include "device.h"
int system_bridge_addbr(struct device *bridge)
{
diff --git a/ubus.c b/ubus.c
index e5df1fb..72cf0e5 100644
--- a/ubus.c
+++ b/ubus.c
@@ -1,6 +1,7 @@
#include <string.h>
#include "netifd.h"
+#include "interface.h"
#include "ubus.h"
static struct ubus_context *ctx = NULL;