core: normalize header inclusion in execute.h a bit
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.
This commit is contained in:
parent
7a1ab780c4
commit
9ce9347880
|
@ -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,
|
||||
|
|
|
@ -21,7 +21,9 @@
|
|||
|
||||
typedef struct Scope Scope;
|
||||
|
||||
#include "cgroup.h"
|
||||
#include "kill.h"
|
||||
#include "unit.h"
|
||||
|
||||
typedef enum ScopeResult {
|
||||
SCOPE_SUCCESS,
|
||||
|
|
Loading…
Reference in a new issue