From e907d750b8e99c9a4dad6bc291f04ff9abaf1d0f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 2 Aug 2016 12:17:53 -0400 Subject: fix --- src/grp-system/libcore/namespace.c | 2 +- src/grp-system/libcore/target.c | 1 - src/grp-system/libcore/target.h | 4 ++++ src/grp-system/libcore/unit.h | 9 +++++---- 4 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src/grp-system/libcore') diff --git a/src/grp-system/libcore/namespace.c b/src/grp-system/libcore/namespace.c index cb85074cce..5af026ff99 100644 --- a/src/grp-system/libcore/namespace.c +++ b/src/grp-system/libcore/namespace.c @@ -18,13 +18,13 @@ ***/ #include -#include #include #include #include #include #include #include +#include #include "basic/alloc-util.h" #include "basic/fd-util.h" diff --git a/src/grp-system/libcore/target.c b/src/grp-system/libcore/target.c index e62a49be84..74af0ced0c 100644 --- a/src/grp-system/libcore/target.c +++ b/src/grp-system/libcore/target.c @@ -23,7 +23,6 @@ #include "basic/unit-name.h" #include "dbus-target.h" -#include "target.h" #include "unit.h" static const UnitActiveState state_translation_table[_TARGET_STATE_MAX] = { diff --git a/src/grp-system/libcore/target.h b/src/grp-system/libcore/target.h index 339aea154e..9ac560ab17 100644 --- a/src/grp-system/libcore/target.h +++ b/src/grp-system/libcore/target.h @@ -19,6 +19,10 @@ along with systemd; If not, see . ***/ +#if __INCLUDE_LEVEL__ <= 1 +#error "Do not include target.h directly; use unit.h, which includes target.h." +#endif + typedef struct Target Target; struct Target { diff --git a/src/grp-system/libcore/unit.h b/src/grp-system/libcore/unit.h index df1174b837..79de5a8a89 100644 --- a/src/grp-system/libcore/unit.h +++ b/src/grp-system/libcore/unit.h @@ -23,16 +23,17 @@ #include #include +#include "shared/condition.h" +#include "shared/install.h" +#include "basic/list.h" +#include "basic/unit-name.h" + typedef struct Unit Unit; typedef struct UnitVTable UnitVTable; typedef struct UnitRef UnitRef; typedef struct UnitStatusMessageFormats UnitStatusMessageFormats; -#include "shared/condition.h" #include "failure-action.h" -#include "shared/install.h" -#include "basic/list.h" -#include "basic/unit-name.h" typedef enum KillOperation { KILL_TERMINATE, -- cgit v1.2.3-54-g00ecf