]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: normalize header inclusion in execute.h a bit
authorLennart Poettering <lennart@poettering.net>
Sat, 2 Jul 2016 02:58:14 +0000 (19:58 -0700)
committerLennart Poettering <lennart@poettering.net>
Wed, 20 Jul 2016 12:53:15 +0000 (14:53 +0200)
We don't actually need any functionality from cgroup.h in execute.h, hence
don't include that. However, we do need the Unit structure from unit.h, hence
include that, and move it as late as possible, since it needs the definitions
from execute.h.

src/core/execute.h
src/core/scope.h

index 73b8a119b064651f31a3bddaad7f0cc3231eb49c..189c4d099906ed8e6af890f08d93c4739128112e 100644 (file)
@@ -30,6 +30,7 @@ typedef struct ExecParameters ExecParameters;
 #include <stdio.h>
 #include <sys/capability.h>
 
+#include "cgroup-util.h"
 #include "fdset.h"
 #include "list.h"
 #include "missing.h"
@@ -203,9 +204,6 @@ struct ExecContext {
         bool no_new_privileges_set:1;
 };
 
-#include "cgroup-util.h"
-#include "cgroup.h"
-
 struct ExecParameters {
         char **argv;
         char **environment;
@@ -236,6 +234,8 @@ struct ExecParameters {
         int stderr_fd;
 };
 
+#include "unit.h"
+
 int exec_spawn(Unit *unit,
                ExecCommand *command,
                const ExecContext *context,
index 2dc86325c5667828332d701118520e9b9de1389c..713b8b9f024ee637af7ec33b4d6ca7b9bbc5bf4a 100644 (file)
@@ -21,7 +21,9 @@
 
 typedef struct Scope Scope;
 
+#include "cgroup.h"
 #include "kill.h"
+#include "unit.h"
 
 typedef enum ScopeResult {
         SCOPE_SUCCESS,