diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index e7ffbe7dea35..97540bbf2cad 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -29,6 +29,7 @@ * $FreeBSD$ */ +#define __RMAN_RESOURCE_VISIBLE #include "opt_acpi.h" #include #include diff --git a/sys/i386/i386/nexus.c b/sys/i386/i386/nexus.c index 3812c0a1acf3..6c72129de243 100644 --- a/sys/i386/i386/nexus.c +++ b/sys/i386/i386/nexus.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include "opt_isa.h" +#define __RMAN_RESOURCE_VISIBLE #include #include #include diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index cff6e7f38bae..8c8b799aa7e0 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include "opt_bus.h" +#define __RMAN_RESOURCE_VISIBLE #include #include #include diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index 754695b5cb82..5eb4bc22d5dd 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -58,6 +58,7 @@ #include __FBSDID("$FreeBSD$"); +#define __RMAN_RESOURCE_VISIBLE #include #include #include diff --git a/sys/sys/rman.h b/sys/sys/rman.h index 68dd1bde6e63..d3af80457495 100644 --- a/sys/sys/rman.h +++ b/sys/sys/rman.h @@ -93,6 +93,7 @@ struct u_rman { * at some point in the future, particularly if we want to support 36-bit * addresses on IA32 hardware. */ +#ifdef __RMAN_RESOURCE_VISIBLE TAILQ_HEAD(resource_head, resource); struct resource { TAILQ_ENTRY(resource) r_link; @@ -119,6 +120,11 @@ struct rman { const char *rm_descr; /* text descripion of this resource */ }; TAILQ_HEAD(rman_head, rman); +#else +struct resource; +struct rman; +struct device; +#endif int rman_activate_resource(struct resource *r); int rman_await_resource(struct resource *r, int pri, int timo);