summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/grp-system/libcore/cgroup.h8
-rw-r--r--src/grp-system/libcore/mount.h1
-rw-r--r--src/libsystemd-basic/include/systemd-basic/raw-clone.h1
-rw-r--r--src/systemd-nspawn/nspawn-seccomp.h2
-rwxr-xr-xtools/test-header.sh2
5 files changed, 8 insertions, 6 deletions
diff --git a/src/grp-system/libcore/cgroup.h b/src/grp-system/libcore/cgroup.h
index 0026609570..a52a70b5e6 100644
--- a/src/grp-system/libcore/cgroup.h
+++ b/src/grp-system/libcore/cgroup.h
@@ -21,10 +21,6 @@
#include <stdbool.h>
-#include "systemd-basic/cgroup-util.h"
-#include "systemd-basic/list.h"
-#include "systemd-basic/time-util.h"
-
typedef struct CGroupContext CGroupContext;
typedef struct CGroupDeviceAllow CGroupDeviceAllow;
typedef struct CGroupIODeviceWeight CGroupIODeviceWeight;
@@ -32,6 +28,10 @@ typedef struct CGroupIODeviceLimit CGroupIODeviceLimit;
typedef struct CGroupBlockIODeviceWeight CGroupBlockIODeviceWeight;
typedef struct CGroupBlockIODeviceBandwidth CGroupBlockIODeviceBandwidth;
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/time-util.h"
+
typedef enum CGroupDevicePolicy {
/* When devices listed, will allow those, plus built-in ones,
diff --git a/src/grp-system/libcore/mount.h b/src/grp-system/libcore/mount.h
index da529c44f4..0caef2b451 100644
--- a/src/grp-system/libcore/mount.h
+++ b/src/grp-system/libcore/mount.h
@@ -21,6 +21,7 @@
typedef struct Mount Mount;
+#include "cgroup.h"
#include "execute.h"
#include "kill.h"
diff --git a/src/libsystemd-basic/include/systemd-basic/raw-clone.h b/src/libsystemd-basic/include/systemd-basic/raw-clone.h
index d473828999..33fdf02f09 100644
--- a/src/libsystemd-basic/include/systemd-basic/raw-clone.h
+++ b/src/libsystemd-basic/include/systemd-basic/raw-clone.h
@@ -21,6 +21,7 @@
#include <sched.h>
#include <sys/syscall.h>
+#include <unistd.h>
#include "log.h"
#include "macro.h"
diff --git a/src/systemd-nspawn/nspawn-seccomp.h b/src/systemd-nspawn/nspawn-seccomp.h
index 5bde16faf9..a01e110c70 100644
--- a/src/systemd-nspawn/nspawn-seccomp.h
+++ b/src/systemd-nspawn/nspawn-seccomp.h
@@ -19,6 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <sys/types.h>
+#include <stdint.h>
int setup_seccomp(uint64_t cap_list_retain);
diff --git a/tools/test-header.sh b/tools/test-header.sh
index b11285af7d..d63177bde0 100755
--- a/tools/test-header.sh
+++ b/tools/test-header.sh
@@ -1,2 +1,2 @@
#!/bin/bash
-gcc -c -o /dev/null -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/libmount $(find src -type d |sed 's|^|-I&|') -include ./config.h -include "$(realpath -- "$1")" test-header.c
+gcc -c -o /dev/null -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/libmount $(find src -type d |sed 's|^|-I&|') -include ./config.h -include "$(realpath -- "$1")" "$(dirname -- "$0")"/test-header.c