summaryrefslogtreecommitdiff
path: root/src/grp-system/libcore
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-08-02 12:17:53 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-08-02 12:17:53 -0400
commite907d750b8e99c9a4dad6bc291f04ff9abaf1d0f (patch)
treee83aa9cebde4e35a7ee61d0f3e7e0608bc54d812 /src/grp-system/libcore
parent272b48187cee0b42b6e936ad2c045f13b391f3ad (diff)
fix
Diffstat (limited to 'src/grp-system/libcore')
-rw-r--r--src/grp-system/libcore/namespace.c2
-rw-r--r--src/grp-system/libcore/target.c1
-rw-r--r--src/grp-system/libcore/target.h4
-rw-r--r--src/grp-system/libcore/unit.h9
4 files changed, 10 insertions, 6 deletions
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 <errno.h>
-#include <linux/fs.h>
#include <sched.h>
#include <stdio.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <linux/fs.h>
#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 <http://www.gnu.org/licenses/>.
***/
+#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 <stdlib.h>
#include <unistd.h>
+#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,