mbox: Forward-declare struct mbox_context
Avoid compilation errors such as:
$ make
make all-am
make[1]: Entering directory '/home/andrew/src/openbmc/phosphor-mboxd'
CC mboxd-common.o
CC mboxd-mboxd_dbus.o
CC mboxd-mboxd_lpc.o
CC mboxd-mboxd_msg.o
CC mboxd-mboxd_windows.o
CC mboxd-mtd.o
CC mboxd-mboxd_flash.o
CC mboxctl-mboxctl.o
CC mboxd-mboxd_lpc_reset.o
In file included from mboxd_dbus.c:28:0:
mbox.h:133:42: error: ‘struct mbox_context’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
typedef int (*mboxd_mbox_handler)(struct mbox_context *, union mbox_regs *,
^~~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:2201: recipe for target 'mboxd-mboxd_dbus.o' failed
make[1]: *** [mboxd-mboxd_dbus.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Change-Id: Ie59a7b6a0831dc509b133fe35a2107f802afb49c
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/mbox.h b/mbox.h
index 7ae002b..19d0a3f 100644
--- a/mbox.h
+++ b/mbox.h
@@ -130,6 +130,8 @@
struct mbox_msg msg;
};
+struct mbox_context;
+
typedef int (*mboxd_mbox_handler)(struct mbox_context *, union mbox_regs *,
struct mbox_msg *);