summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/grp-coredump/systemd-coredump/coredump.c15
-rw-r--r--src/grp-initprogs/systemd-update-utmp/update-utmp.c4
-rw-r--r--src/grp-journal/grp-remote/Makefile2
-rw-r--r--src/grp-journal/grp-remote/microhttpd-util.c3
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile2
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-gatewayd/journal-gatewayd.c6
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/Makefile2
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.c11
-rw-r--r--src/grp-journal/grp-remote/systemd-journal-upload/Makefile2
-rw-r--r--src/grp-journal/libjournal-core/journald-server.c1
-rw-r--r--src/grp-journal/libjournal-core/journald-stream.c13
-rw-r--r--src/grp-journal/libjournal-core/test-compress.c2
-rw-r--r--src/grp-locale/systemd-localed/localed.c2
-rw-r--r--src/grp-login/systemd-logind/logind-action.h3
-rw-r--r--src/grp-login/systemd-logind/logind-core.c3
-rw-r--r--src/grp-login/systemd-logind/logind-dbus.c3
-rw-r--r--src/grp-login/systemd-logind/logind-seat-dbus.c2
-rw-r--r--src/grp-login/systemd-logind/logind-session-dbus.c2
-rw-r--r--src/grp-login/systemd-logind/logind-session.h6
-rw-r--r--src/grp-login/systemd-logind/logind-user-dbus.c2
-rw-r--r--src/grp-login/systemd-logind/logind-utmp.c3
-rw-r--r--src/grp-machine/grp-import/systemd-export/export-raw.c5
-rw-r--r--src/grp-machine/grp-import/systemd-import/import-raw.c4
-rw-r--r--src/grp-machine/grp-import/systemd-import/import-tar.c4
-rw-r--r--src/grp-machine/grp-import/systemd-pull/pull-job.h4
-rw-r--r--src/grp-machine/grp-import/systemd-pull/pull-raw.c2
-rw-r--r--src/grp-machine/grp-import/systemd-pull/pull-tar.c2
-rw-r--r--src/grp-machine/systemd-machined/machine.h6
-rw-r--r--src/grp-resolve/libbasic-dns/resolved-dns-dnssec.c5
-rw-r--r--src/grp-resolve/libbasic-dns/resolved-dns-dnssec.h4
-rw-r--r--src/grp-resolve/systemd-resolve/resolve-tool.c5
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-bus.c2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-cache.c4
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-query.c2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-query.h4
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-scope.h4
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-stream.h2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-synthesize.h1
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-transaction.h1
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h5
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-zone.c2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-zone.h7
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-etc-hosts.h1
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-link.h2
-rw-r--r--src/grp-system/libcore/dbus-execute.c9
-rw-r--r--src/grp-system/libcore/execute.c8
-rw-r--r--src/grp-system/libcore/execute.h1
-rw-r--r--src/grp-system/libcore/kmod-setup.c5
-rw-r--r--src/grp-system/libcore/load-fragment.c18
-rw-r--r--src/grp-system/libcore/manager.c30
-rw-r--r--src/grp-system/libcore/manager.h5
-rw-r--r--src/grp-system/libcore/selinux-access.c5
-rw-r--r--src/grp-system/libcore/selinux-setup.c3
-rw-r--r--src/grp-udev/hwdb/Makefile2
-rw-r--r--src/grp-udev/systemd-hwdb/Makefile2
-rw-r--r--src/libbasic/src/hashmap.c1
-rw-r--r--src/libfirewall/firewall-util.c6
-rw-r--r--src/libshared/include/shared/install.h10
-rw-r--r--src/libshared/src/dns-domain.c2
-rw-r--r--src/libshared/src/gcrypt-util.c3
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-dhcp-client.h1
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h1
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-ndisc.h1
-rw-r--r--src/libsystemd/src/sd-bus/bus-control.c11
-rw-r--r--src/libsystemd/src/sd-bus/bus-kernel.c11
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-gvariant.c7
-rw-r--r--src/libsystemd/src/sd-bus/test-bus-marshal.c7
-rw-r--r--src/libsystemd/src/sd-journal/audit-type.c3
-rw-r--r--src/libsystemd/src/sd-journal/compress.c5
-rw-r--r--src/libsystemd/src/sd-journal/journal-file.h7
-rw-r--r--src/systemd-nspawn/nspawn-patch-uid.c5
-rw-r--r--src/systemd-nspawn/nspawn.c30
-rw-r--r--src/test/test-af-list.c4
-rw-r--r--src/test/test-arphrd-list.c4
75 files changed, 203 insertions, 173 deletions
diff --git a/src/grp-coredump/systemd-coredump/coredump.c b/src/grp-coredump/systemd-coredump/coredump.c
index 8f291e6bd8..b1da8eaba4 100644
--- a/src/grp-coredump/systemd-coredump/coredump.c
+++ b/src/grp-coredump/systemd-coredump/coredump.c
@@ -28,25 +28,20 @@
#include <elfutils/libdwfl.h>
#endif
+#include <systemd/sd-daemon.h>
#include <systemd/sd-journal.h>
#include <systemd/sd-login.h>
-#include <systemd/sd-daemon.h>
-#include "shared/acl-util.h"
#include "basic/alloc-util.h"
#include "basic/capability-util.h"
#include "basic/cgroup-util.h"
-#include "sd-journal/compress.h"
-#include "shared/conf-parser.h"
#include "basic/copy.h"
-#include "coredump-vacuum.h"
#include "basic/dirent-util.h"
#include "basic/escape.h"
#include "basic/fd-util.h"
#include "basic/fileio.h"
#include "basic/fs-util.h"
#include "basic/io-util.h"
-#include "journald-native.h"
#include "basic/log.h"
#include "basic/macro.h"
#include "basic/missing.h"
@@ -55,12 +50,18 @@
#include "basic/process-util.h"
#include "basic/socket-util.h"
#include "basic/special.h"
-#include "stacktrace.h"
#include "basic/string-table.h"
#include "basic/string-util.h"
#include "basic/strv.h"
#include "basic/user-util.h"
#include "basic/util.h"
+#include "journald-native.h"
+#include "sd-journal/compress.h"
+#include "shared/acl-util.h"
+#include "shared/conf-parser.h"
+
+#include "coredump-vacuum.h"
+#include "stacktrace.h"
/* The maximum size up to which we process coredumps */
#define PROCESS_SIZE_MAX ((uint64_t) (2LLU*1024LLU*1024LLU*1024LLU))
diff --git a/src/grp-initprogs/systemd-update-utmp/update-utmp.c b/src/grp-initprogs/systemd-update-utmp/update-utmp.c
index 69264c3a26..cceb34f60d 100644
--- a/src/grp-initprogs/systemd-update-utmp/update-utmp.c
+++ b/src/grp-initprogs/systemd-update-utmp/update-utmp.c
@@ -28,14 +28,14 @@
#include <systemd/sd-bus.h>
#include "basic/alloc-util.h"
-#include "sd-bus/bus-error.h"
-#include "shared/bus-util.h"
#include "basic/formats-util.h"
#include "basic/log.h"
#include "basic/macro.h"
#include "basic/special.h"
#include "basic/unit-name.h"
#include "basic/util.h"
+#include "sd-bus/bus-error.h"
+#include "shared/bus-util.h"
#include "shared/utmp-wtmp.h"
typedef struct Context {
diff --git a/src/grp-journal/grp-remote/Makefile b/src/grp-journal/grp-remote/Makefile
index b1415ad6d3..66e419a37e 100644
--- a/src/grp-journal/grp-remote/Makefile
+++ b/src/grp-journal/grp-remote/Makefile
@@ -20,7 +20,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
nested.subdirs += systemd-journal-gatewayd
diff --git a/src/grp-journal/grp-remote/microhttpd-util.c b/src/grp-journal/grp-remote/microhttpd-util.c
index 99d6f32a2a..328e3b5a52 100644
--- a/src/grp-journal/grp-remote/microhttpd-util.c
+++ b/src/grp-journal/grp-remote/microhttpd-util.c
@@ -30,11 +30,12 @@
#include "basic/alloc-util.h"
#include "basic/log.h"
#include "basic/macro.h"
-#include "microhttpd-util.h"
#include "basic/string-util.h"
#include "basic/strv.h"
#include "basic/util.h"
+#include "microhttpd-util.h"
+
void microhttpd_logger(void *arg, const char *fmt, va_list ap) {
char *f;
diff --git a/src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile b/src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile
index b3c2e450e5..d481db82dc 100644
--- a/src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile
+++ b/src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile
@@ -20,7 +20,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
ifneq ($(HAVE_MICROHTTPD),)
diff --git a/src/grp-journal/grp-remote/systemd-journal-gatewayd/journal-gatewayd.c b/src/grp-journal/grp-remote/systemd-journal-gatewayd/journal-gatewayd.c
index 2e21f9ecb7..76b241a14b 100644
--- a/src/grp-journal/grp-remote/systemd-journal-gatewayd/journal-gatewayd.c
+++ b/src/grp-journal/grp-remote/systemd-journal-gatewayd/journal-gatewayd.c
@@ -32,16 +32,16 @@
#include <systemd/sd-journal.h>
#include "basic/alloc-util.h"
-#include "shared/bus-util.h"
#include "basic/fd-util.h"
#include "basic/fileio.h"
#include "basic/hostname-util.h"
#include "basic/log.h"
-#include "shared/logs-show.h"
-#include "microhttpd-util.h"
#include "basic/parse-util.h"
#include "basic/sigbus.h"
#include "basic/util.h"
+#include "microhttpd-util.h"
+#include "shared/bus-util.h"
+#include "shared/logs-show.h"
#define JOURNAL_WAIT_TIMEOUT (10*USEC_PER_SEC)
diff --git a/src/grp-journal/grp-remote/systemd-journal-remote/Makefile b/src/grp-journal/grp-remote/systemd-journal-remote/Makefile
index 7a9d9b19df..45ed4abb63 100644
--- a/src/grp-journal/grp-remote/systemd-journal-remote/Makefile
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/Makefile
@@ -20,7 +20,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
ifneq ($(HAVE_MICROHTTPD),)
diff --git a/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.c b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.c
index 6ea7adabb0..ac1ba30310 100644
--- a/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.c
+++ b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.c
@@ -34,15 +34,10 @@
#include <systemd/sd-daemon.h>
#include "basic/alloc-util.h"
-#include "shared/conf-parser.h"
#include "basic/def.h"
#include "basic/escape.h"
#include "basic/fd-util.h"
#include "basic/fileio.h"
-#include "journal-file.h"
-#include "journal-remote-write.h"
-#include "journal-remote.h"
-#include "journald-native.h"
#include "basic/macro.h"
#include "basic/parse-util.h"
#include "basic/signal-util.h"
@@ -52,6 +47,12 @@
#include "basic/string-table.h"
#include "basic/string-util.h"
#include "basic/strv.h"
+#include "journald-native.h"
+#include "sd-journal/journal-file.h"
+#include "shared/conf-parser.h"
+
+#include "journal-remote-write.h"
+#include "journal-remote.h"
#define REMOTE_JOURNAL_PATH "/var/log/journal/remote"
diff --git a/src/grp-journal/grp-remote/systemd-journal-upload/Makefile b/src/grp-journal/grp-remote/systemd-journal-upload/Makefile
index 845a3a566d..3d90f294af 100644
--- a/src/grp-journal/grp-remote/systemd-journal-upload/Makefile
+++ b/src/grp-journal/grp-remote/systemd-journal-upload/Makefile
@@ -20,7 +20,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
ifneq ($(HAVE_LIBCURL),)
diff --git a/src/grp-journal/libjournal-core/journald-server.c b/src/grp-journal/libjournal-core/journald-server.c
index 4dca4b02b3..8bc2e55709 100644
--- a/src/grp-journal/libjournal-core/journald-server.c
+++ b/src/grp-journal/libjournal-core/journald-server.c
@@ -24,6 +24,7 @@
#include <sys/mman.h>
#include <sys/signalfd.h>
#include <sys/statvfs.h>
+
#include <linux/sockios.h>
#include <libudev.h>
diff --git a/src/grp-journal/libjournal-core/journald-stream.c b/src/grp-journal/libjournal-core/journald-stream.c
index 4b0062bc9a..e90dfac1cd 100644
--- a/src/grp-journal/libjournal-core/journald-stream.c
+++ b/src/grp-journal/libjournal-core/journald-stream.c
@@ -33,12 +33,6 @@
#include "basic/fd-util.h"
#include "basic/fileio.h"
#include "basic/io-util.h"
-#include "journald-console.h"
-#include "journald-kmsg.h"
-#include "journald-server.h"
-#include "journald-stream.h"
-#include "journald-syslog.h"
-#include "journald-wall.h"
#include "basic/mkdir.h"
#include "basic/parse-util.h"
#include "basic/selinux-util.h"
@@ -47,6 +41,13 @@
#include "basic/string-util.h"
#include "basic/syslog-util.h"
+#include "journald-console.h"
+#include "journald-kmsg.h"
+#include "journald-server.h"
+#include "journald-stream.h"
+#include "journald-syslog.h"
+#include "journald-wall.h"
+
#define STDOUT_STREAMS_MAX 4096
typedef enum StdoutStreamState {
diff --git a/src/grp-journal/libjournal-core/test-compress.c b/src/grp-journal/libjournal-core/test-compress.c
index 8cd098cabc..5682c28e8c 100644
--- a/src/grp-journal/libjournal-core/test-compress.c
+++ b/src/grp-journal/libjournal-core/test-compress.c
@@ -22,12 +22,12 @@
#endif
#include "basic/alloc-util.h"
-#include "compress.h"
#include "basic/fd-util.h"
#include "basic/fileio.h"
#include "basic/macro.h"
#include "basic/random-util.h"
#include "basic/util.h"
+#include "sd-journal/compress.h"
#ifdef HAVE_XZ
# define XZ_OK 0
diff --git a/src/grp-locale/systemd-localed/localed.c b/src/grp-locale/systemd-localed/localed.c
index 7bb7f1cf34..a876cd0718 100644
--- a/src/grp-locale/systemd-localed/localed.c
+++ b/src/grp-locale/systemd-localed/localed.c
@@ -23,8 +23,8 @@
#include <unistd.h>
#ifdef HAVE_XKBCOMMON
-#include <xkbcommon/xkbcommon.h>
#include <dlfcn.h>
+#include <xkbcommon/xkbcommon.h>
#endif
#include <systemd/sd-bus.h>
diff --git a/src/grp-login/systemd-logind/logind-action.h b/src/grp-login/systemd-logind/logind-action.h
index 39ba3cf0f6..fb40ae48d2 100644
--- a/src/grp-login/systemd-logind/logind-action.h
+++ b/src/grp-login/systemd-logind/logind-action.h
@@ -33,9 +33,8 @@ typedef enum HandleAction {
_HANDLE_ACTION_INVALID = -1
} HandleAction;
-#include "logind.h"
-
#include "logind-inhibit.h"
+#include "logind.h"
int manager_handle_action(
Manager *m,
diff --git a/src/grp-login/systemd-logind/logind-core.c b/src/grp-login/systemd-logind/logind-core.c
index 1d6475f8d7..13ea97ae0d 100644
--- a/src/grp-login/systemd-logind/logind-core.c
+++ b/src/grp-login/systemd-logind/logind-core.c
@@ -30,11 +30,12 @@
#include "basic/strv.h"
#include "basic/terminal-util.h"
#include "basic/user-util.h"
-#include "logind.h"
#include "sd-bus/bus-error.h"
#include "shared/bus-util.h"
#include "shared/udev-util.h"
+#include "logind.h"
+
int manager_add_device(Manager *m, const char *sysfs, bool master, Device **_device) {
Device *d;
diff --git a/src/grp-login/systemd-logind/logind-dbus.c b/src/grp-login/systemd-logind/logind-dbus.c
index cb51e43a5c..282ba64a3d 100644
--- a/src/grp-login/systemd-logind/logind-dbus.c
+++ b/src/grp-login/systemd-logind/logind-dbus.c
@@ -41,7 +41,6 @@
#include "basic/terminal-util.h"
#include "basic/unit-name.h"
#include "basic/user-util.h"
-#include "logind.h"
#include "sd-bus/bus-common-errors.h"
#include "sd-bus/bus-error.h"
#include "shared/bus-util.h"
@@ -50,6 +49,8 @@
#include "shared/udev-util.h"
#include "shared/utmp-wtmp.h"
+#include "logind.h"
+
int manager_get_session_from_creds(Manager *m, sd_bus_message *message, const char *name, sd_bus_error *error, Session **ret) {
_cleanup_(sd_bus_creds_unrefp) sd_bus_creds *creds = NULL;
Session *session;
diff --git a/src/grp-login/systemd-logind/logind-seat-dbus.c b/src/grp-login/systemd-logind/logind-seat-dbus.c
index fbebe6fcff..e4febe1ab5 100644
--- a/src/grp-login/systemd-logind/logind-seat-dbus.c
+++ b/src/grp-login/systemd-logind/logind-seat-dbus.c
@@ -25,11 +25,11 @@
#include "basic/strv.h"
#include "basic/user-util.h"
#include "basic/util.h"
-#include "logind.h"
#include "sd-bus/bus-common-errors.h"
#include "shared/bus-util.h"
#include "logind-seat.h"
+#include "logind.h"
static int property_get_active_session(
sd_bus *bus,
diff --git a/src/grp-login/systemd-logind/logind-session-dbus.c b/src/grp-login/systemd-logind/logind-session-dbus.c
index 76228d4474..f79f9b5003 100644
--- a/src/grp-login/systemd-logind/logind-session-dbus.c
+++ b/src/grp-login/systemd-logind/logind-session-dbus.c
@@ -26,12 +26,12 @@
#include "basic/signal-util.h"
#include "basic/strv.h"
#include "basic/util.h"
-#include "logind.h"
#include "sd-bus/bus-common-errors.h"
#include "shared/bus-util.h"
#include "logind-session-device.h"
#include "logind-session.h"
+#include "logind.h"
static int property_get_user(
sd_bus *bus,
diff --git a/src/grp-login/systemd-logind/logind-session.h b/src/grp-login/systemd-logind/logind-session.h
index 23ff6576c9..976046d847 100644
--- a/src/grp-login/systemd-logind/logind-session.h
+++ b/src/grp-login/systemd-logind/logind-session.h
@@ -19,12 +19,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct Session Session;
-typedef enum KillWho KillWho;
-
#include "basic/list.h"
#include "basic/login-util.h"
+typedef enum KillWho KillWho;
+typedef struct Session Session;
+
#include "logind-user.h"
typedef enum SessionState {
diff --git a/src/grp-login/systemd-logind/logind-user-dbus.c b/src/grp-login/systemd-logind/logind-user-dbus.c
index d82ced605e..57d1c857e6 100644
--- a/src/grp-login/systemd-logind/logind-user-dbus.c
+++ b/src/grp-login/systemd-logind/logind-user-dbus.c
@@ -25,10 +25,10 @@
#include "basic/signal-util.h"
#include "basic/strv.h"
#include "basic/user-util.h"
-#include "logind.h"
#include "shared/bus-util.h"
#include "logind-user.h"
+#include "logind.h"
static int property_get_display(
sd_bus *bus,
diff --git a/src/grp-login/systemd-logind/logind-utmp.c b/src/grp-login/systemd-logind/logind-utmp.c
index c5dc137d61..1e97083f78 100644
--- a/src/grp-login/systemd-logind/logind-utmp.c
+++ b/src/grp-login/systemd-logind/logind-utmp.c
@@ -31,12 +31,13 @@
#include "basic/strv.h"
#include "basic/unit-name.h"
#include "basic/user-util.h"
-#include "logind.h"
#include "sd-bus/bus-common-errors.h"
#include "sd-bus/bus-error.h"
#include "shared/bus-util.h"
#include "shared/utmp-wtmp.h"
+#include "logind.h"
+
_const_ static usec_t when_wall(usec_t n, usec_t elapse) {
usec_t left;
diff --git a/src/grp-machine/grp-import/systemd-export/export-raw.c b/src/grp-machine/grp-import/systemd-export/export-raw.c
index 1e3f6e034e..c17fc952d3 100644
--- a/src/grp-machine/grp-import/systemd-export/export-raw.c
+++ b/src/grp-machine/grp-import/systemd-export/export-raw.c
@@ -30,13 +30,14 @@
#include "basic/alloc-util.h"
#include "basic/btrfs-util.h"
#include "basic/copy.h"
-#include "export-raw.h"
#include "basic/fd-util.h"
#include "basic/fileio.h"
-#include "import-common.h"
#include "basic/ratelimit.h"
#include "basic/string-util.h"
#include "basic/util.h"
+#include "import-common.h"
+
+#include "export-raw.h"
#define COPY_BUFFER_SIZE (16*1024)
diff --git a/src/grp-machine/grp-import/systemd-import/import-raw.c b/src/grp-machine/grp-import/systemd-import/import-raw.c
index 658c912f88..55a6d044ab 100644
--- a/src/grp-machine/grp-import/systemd-import/import-raw.c
+++ b/src/grp-machine/grp-import/systemd-import/import-raw.c
@@ -37,11 +37,11 @@
#include "basic/rm-rf.h"
#include "basic/string-util.h"
#include "basic/util.h"
+#include "import-common.h"
+#include "import-compress.h"
#include "qcow2-util.h"
#include "shared/machine-pool.h"
-#include "import-common.h"
-#include "import-compress.h"
#include "import-raw.h"
struct RawImport {
diff --git a/src/grp-machine/grp-import/systemd-import/import-tar.c b/src/grp-machine/grp-import/systemd-import/import-tar.c
index f66a7e7e4c..0d61b5f01d 100644
--- a/src/grp-machine/grp-import/systemd-import/import-tar.c
+++ b/src/grp-machine/grp-import/systemd-import/import-tar.c
@@ -37,11 +37,11 @@
#include "basic/rm-rf.h"
#include "basic/string-util.h"
#include "basic/util.h"
+#include "import-common.h"
+#include "import-compress.h"
#include "qcow2-util.h"
#include "shared/machine-pool.h"
-#include "import-common.h"
-#include "import-compress.h"
#include "import-tar.h"
struct TarImport {
diff --git a/src/grp-machine/grp-import/systemd-pull/pull-job.h b/src/grp-machine/grp-import/systemd-pull/pull-job.h
index d8308e4046..296e32bd09 100644
--- a/src/grp-machine/grp-import/systemd-pull/pull-job.h
+++ b/src/grp-machine/grp-import/systemd-pull/pull-job.h
@@ -22,11 +22,11 @@
#include <gcrypt.h>
#include "basic/macro.h"
-#include "curl-util.h"
#include "import-compress.h"
-typedef struct PullJob PullJob;
+#include "curl-util.h"
+typedef struct PullJob PullJob;
typedef void (*PullJobFinished)(PullJob *job);
typedef int (*PullJobOpenDisk)(PullJob *job);
typedef int (*PullJobHeader)(PullJob *job, const char *header, size_t sz);
diff --git a/src/grp-machine/grp-import/systemd-pull/pull-raw.c b/src/grp-machine/grp-import/systemd-pull/pull-raw.c
index 59257d6a0c..9602915a1f 100644
--- a/src/grp-machine/grp-import/systemd-pull/pull-raw.c
+++ b/src/grp-machine/grp-import/systemd-pull/pull-raw.c
@@ -41,11 +41,11 @@
#include "basic/utf8.h"
#include "basic/util.h"
#include "basic/web-util.h"
-#include "curl-util.h"
#include "import-common.h"
#include "qcow2-util.h"
#include "shared/import-util.h"
+#include "curl-util.h"
#include "pull-common.h"
#include "pull-job.h"
#include "pull-raw.h"
diff --git a/src/grp-machine/grp-import/systemd-pull/pull-tar.c b/src/grp-machine/grp-import/systemd-pull/pull-tar.c
index e6031db0ed..121ca31dbd 100644
--- a/src/grp-machine/grp-import/systemd-pull/pull-tar.c
+++ b/src/grp-machine/grp-import/systemd-pull/pull-tar.c
@@ -39,10 +39,10 @@
#include "basic/utf8.h"
#include "basic/util.h"
#include "basic/web-util.h"
-#include "curl-util.h"
#include "import-common.h"
#include "shared/import-util.h"
+#include "curl-util.h"
#include "pull-common.h"
#include "pull-job.h"
#include "pull-tar.h"
diff --git a/src/grp-machine/systemd-machined/machine.h b/src/grp-machine/systemd-machined/machine.h
index cba0311c23..e93f0cf222 100644
--- a/src/grp-machine/systemd-machined/machine.h
+++ b/src/grp-machine/systemd-machined/machine.h
@@ -19,11 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct Machine Machine;
-typedef enum KillWho KillWho;
-
#include "basic/list.h"
+typedef enum KillWho KillWho;
+typedef struct Machine Machine;
+
#include "machined.h"
#include "operation.h"
diff --git a/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.c b/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.c
index 39afbada25..7d58edcdfa 100644
--- a/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.c
+++ b/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.c
@@ -22,12 +22,13 @@
#endif
#include "basic/alloc-util.h"
+#include "basic/hexdecoct.h"
+#include "basic/string-table.h"
#include "shared/dns-domain.h"
#include "shared/gcrypt-util.h"
-#include "basic/hexdecoct.h"
+
#include "resolved-dns-dnssec.h"
#include "resolved-dns-packet.h"
-#include "basic/string-table.h"
#define VERIFY_RRS_MAX 256
#define MAX_KEY_SIZE (32*1024)
diff --git a/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.h b/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.h
index 81879e287f..b73cc24100 100644
--- a/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.h
+++ b/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.h
@@ -19,11 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "shared/dns-domain.h"
+
typedef enum DnssecResult DnssecResult;
typedef enum DnssecVerdict DnssecVerdict;
-#include "shared/dns-domain.h"
-
#include "resolved-dns-answer.h"
#include "resolved-dns-rr.h"
diff --git a/src/grp-resolve/systemd-resolve/resolve-tool.c b/src/grp-resolve/systemd-resolve/resolve-tool.c
index d9f28576b7..dee23289b3 100644
--- a/src/grp-resolve/systemd-resolve/resolve-tool.c
+++ b/src/grp-resolve/systemd-resolve/resolve-tool.c
@@ -28,13 +28,12 @@
#include "basic/in-addr-util.h"
#include "basic/parse-util.h"
#include "basic/terminal-util.h"
+#include "resolved-def.h"
+#include "resolved-dns-packet.h"
#include "sd-bus/bus-error.h"
#include "shared/bus-util.h"
#include "shared/gcrypt-util.h"
-#include "resolved-def.h"
-#include "resolved-dns-packet.h"
-
#define DNS_CALL_TIMEOUT_USEC (45*USEC_PER_SEC)
static int arg_family = AF_UNSPEC;
diff --git a/src/grp-resolve/systemd-resolved/resolved-bus.c b/src/grp-resolve/systemd-resolved/resolved-bus.c
index 31c6999743..1454e1f5f4 100644
--- a/src/grp-resolve/systemd-resolved/resolved-bus.c
+++ b/src/grp-resolve/systemd-resolved/resolved-bus.c
@@ -18,12 +18,12 @@
***/
#include "basic/alloc-util.h"
+#include "resolved-def.h"
#include "sd-bus/bus-common-errors.h"
#include "shared/bus-util.h"
#include "shared/dns-domain.h"
#include "resolved-bus.h"
-#include "resolved-def.h"
#include "resolved-dns-synthesize.h"
#include "resolved-link-bus.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-cache.c b/src/grp-resolve/systemd-resolved/resolved-dns-cache.c
index 8ef2048c49..33e0582d98 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-cache.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-cache.c
@@ -22,11 +22,11 @@
#include "basic/af-list.h"
#include "basic/alloc-util.h"
#include "basic/string-util.h"
+#include "resolved-dns-answer.h"
+#include "resolved-dns-packet.h"
#include "shared/dns-domain.h"
-#include "resolved-dns-answer.h"
#include "resolved-dns-cache.h"
-#include "resolved-dns-packet.h"
/* Never cache more than 4K entries. RFC 1536, Section 5 suggests to
* leave DNS caches unbounded, but that's crazy. */
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-query.c b/src/grp-resolve/systemd-resolved/resolved-dns-query.c
index f512748f8d..7b9282a69d 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-query.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-query.c
@@ -20,10 +20,10 @@
#include "basic/alloc-util.h"
#include "basic/hostname-util.h"
#include "basic/string-util.h"
+#include "dns-type.h"
#include "sd-netlink/local-addresses.h"
#include "shared/dns-domain.h"
-#include "dns-type.h"
#include "resolved-dns-query.h"
#include "resolved-dns-synthesize.h"
#include "resolved-etc-hosts.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-query.h b/src/grp-resolve/systemd-resolved/resolved-dns-query.h
index 86d861ce76..4a127930bd 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-query.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-query.h
@@ -23,12 +23,12 @@
#include <systemd/sd-bus.h>
#include "basic/set.h"
+#include "resolved-dns-answer.h"
+#include "resolved-dns-question.h"
typedef struct DnsQuery DnsQuery;
typedef struct DnsQueryCandidate DnsQueryCandidate;
-#include "resolved-dns-answer.h"
-#include "resolved-dns-question.h"
#include "resolved-dns-search-domain.h"
#include "resolved-dns-stream.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-scope.h b/src/grp-resolve/systemd-resolved/resolved-dns-scope.h
index 293e2bdf37..e3c4e15ead 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-scope.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-scope.h
@@ -20,12 +20,12 @@
***/
#include "basic/list.h"
+#include "resolved-dns-dnssec.h"
+#include "resolved-dns-packet.h"
typedef struct DnsScope DnsScope;
#include "resolved-dns-cache.h"
-#include "resolved-dns-dnssec.h"
-#include "resolved-dns-packet.h"
#include "resolved-dns-server.h"
#include "resolved-dns-stream.h"
#include "resolved-dns-zone.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-stream.h b/src/grp-resolve/systemd-resolved/resolved-dns-stream.h
index a47b2ab3ed..65be14c5ed 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-stream.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-stream.h
@@ -20,10 +20,10 @@
***/
#include "basic/socket-util.h"
+#include "resolved-dns-packet.h"
typedef struct DnsStream DnsStream;
-#include "resolved-dns-packet.h"
#include "resolved-dns-transaction.h"
#include "resolved-manager.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.h b/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.h
index 5d829bb2e7..2309105068 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.h
@@ -21,6 +21,7 @@
#include "resolved-dns-answer.h"
#include "resolved-dns-question.h"
+
#include "resolved-manager.h"
int dns_synthesize_ifindex(int ifindex);
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h
index 9783488200..96cedd7bc8 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h
@@ -60,6 +60,7 @@ enum DnsTransactionSource {
#include "resolved-dns-answer.h"
#include "resolved-dns-packet.h"
#include "resolved-dns-question.h"
+
#include "resolved-dns-scope.h"
struct DnsTransaction {
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c
index b7c0b08fba..c9f221d425 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c
@@ -29,9 +29,9 @@
#include "basic/set.h"
#include "basic/string-util.h"
#include "basic/strv.h"
+#include "resolved-dns-dnssec.h"
#include "shared/dns-domain.h"
-#include "resolved-dns-dnssec.h"
#include "resolved-dns-trust-anchor.h"
static const char trust_anchor_dirs[] = CONF_PATHS_NULSTR("dnssec-trust-anchors.d");
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h
index 193e4a6923..ee5cda0748 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h
@@ -20,12 +20,11 @@
***/
#include "basic/hashmap.h"
-
-typedef struct DnsTrustAnchor DnsTrustAnchor;
-
#include "resolved-dns-answer.h"
#include "resolved-dns-rr.h"
+typedef struct DnsTrustAnchor DnsTrustAnchor;
+
/* This contains a fixed database mapping domain names to DS or DNSKEY records. */
struct DnsTrustAnchor {
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-zone.c b/src/grp-resolve/systemd-resolved/resolved-dns-zone.c
index 192811fc17..3d5bc9ea82 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-zone.c
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-zone.c
@@ -20,9 +20,9 @@
#include "basic/alloc-util.h"
#include "basic/list.h"
#include "basic/string-util.h"
+#include "resolved-dns-packet.h"
#include "shared/dns-domain.h"
-#include "resolved-dns-packet.h"
#include "resolved-dns-zone.h"
/* Never allow more than 1K entries */
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-zone.h b/src/grp-resolve/systemd-resolved/resolved-dns-zone.h
index baddbc78ec..0c43bf2b96 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-zone.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-zone.h
@@ -26,12 +26,13 @@ typedef struct DnsZone {
Hashmap *by_name;
} DnsZone;
-typedef struct DnsZoneItem DnsZoneItem;
-typedef enum DnsZoneItemState DnsZoneItemState;
-
#include "resolved-dns-answer.h"
#include "resolved-dns-question.h"
#include "resolved-dns-rr.h"
+
+typedef enum DnsZoneItemState DnsZoneItemState;
+typedef struct DnsZoneItem DnsZoneItem;
+
#include "resolved-dns-transaction.h"
/* RFC 4795 Section 2.8. suggests a TTL of 30s by default */
diff --git a/src/grp-resolve/systemd-resolved/resolved-etc-hosts.h b/src/grp-resolve/systemd-resolved/resolved-etc-hosts.h
index 047443a896..e68d87417e 100644
--- a/src/grp-resolve/systemd-resolved/resolved-etc-hosts.h
+++ b/src/grp-resolve/systemd-resolved/resolved-etc-hosts.h
@@ -21,6 +21,7 @@
#include "resolved-dns-answer.h"
#include "resolved-dns-question.h"
+
#include "resolved-manager.h"
void manager_etc_hosts_flush(Manager *m);
diff --git a/src/grp-resolve/systemd-resolved/resolved-link.h b/src/grp-resolve/systemd-resolved/resolved-link.h
index 8aa270cfd6..98b440b563 100644
--- a/src/grp-resolve/systemd-resolved/resolved-link.h
+++ b/src/grp-resolve/systemd-resolved/resolved-link.h
@@ -23,12 +23,12 @@
#include "basic/in-addr-util.h"
#include "basic/ratelimit.h"
+#include "resolved-dns-rr.h"
#include "shared/resolve-util.h"
typedef struct Link Link;
typedef struct LinkAddress LinkAddress;
-#include "resolved-dns-rr.h"
#include "resolved-dns-scope.h"
#include "resolved-dns-search-domain.h"
#include "resolved-dns-server.h"
diff --git a/src/grp-system/libcore/dbus-execute.c b/src/grp-system/libcore/dbus-execute.c
index b5530d945e..fe1d9da440 100644
--- a/src/grp-system/libcore/dbus-execute.c
+++ b/src/grp-system/libcore/dbus-execute.c
@@ -25,20 +25,21 @@
#include "basic/af-list.h"
#include "basic/alloc-util.h"
-#include "shared/bus-util.h"
#include "basic/capability-util.h"
-#include "dbus-execute.h"
#include "basic/env-util.h"
-#include "execute.h"
#include "basic/fd-util.h"
#include "basic/fileio.h"
#include "basic/ioprio.h"
#include "basic/missing.h"
-#include "namespace.h"
#include "basic/parse-util.h"
#include "basic/path-util.h"
#include "basic/process-util.h"
#include "basic/rlimit-util.h"
+#include "shared/bus-util.h"
+
+#include "dbus-execute.h"
+#include "execute.h"
+#include "namespace.h"
#ifdef HAVE_SECCOMP
#include "shared/seccomp-util.h"
#endif
diff --git a/src/grp-system/libcore/execute.c b/src/grp-system/libcore/execute.c
index e7628bceb3..b19473c6a5 100644
--- a/src/grp-system/libcore/execute.c
+++ b/src/grp-system/libcore/execute.c
@@ -63,7 +63,6 @@
#include "basic/def.h"
#include "basic/env-util.h"
#include "basic/errno-list.h"
-#include "execute.h"
#include "basic/exit-status.h"
#include "basic/fd-util.h"
#include "basic/fileio.h"
@@ -76,12 +75,14 @@
#include "basic/macro.h"
#include "basic/missing.h"
#include "basic/mkdir.h"
-#include "namespace.h"
#include "basic/parse-util.h"
#include "basic/path-util.h"
#include "basic/process-util.h"
#include "basic/rlimit-util.h"
#include "basic/rm-rf.h"
+
+#include "execute.h"
+#include "namespace.h"
#ifdef HAVE_SECCOMP
#include "shared/seccomp-util.h"
#endif
@@ -94,11 +95,12 @@
#include "basic/strv.h"
#include "basic/syslog-util.h"
#include "basic/terminal-util.h"
-#include "unit.h"
#include "basic/user-util.h"
#include "basic/util.h"
#include "shared/utmp-wtmp.h"
+#include "unit.h"
+
#define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC)
#define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC)
diff --git a/src/grp-system/libcore/execute.h b/src/grp-system/libcore/execute.h
index 73292dd086..18d6f0e4a3 100644
--- a/src/grp-system/libcore/execute.h
+++ b/src/grp-system/libcore/execute.h
@@ -201,6 +201,7 @@ struct ExecContext {
};
#include "basic/cgroup-util.h"
+
#include "cgroup.h"
struct ExecParameters {
diff --git a/src/grp-system/libcore/kmod-setup.c b/src/grp-system/libcore/kmod-setup.c
index 6ddf1137ec..a6fa6a32fb 100644
--- a/src/grp-system/libcore/kmod-setup.c
+++ b/src/grp-system/libcore/kmod-setup.c
@@ -24,10 +24,11 @@
#include <libkmod.h>
#endif
-#include "shared/bus-util.h"
#include "basic/capability-util.h"
-#include "kmod-setup.h"
#include "basic/macro.h"
+#include "shared/bus-util.h"
+
+#include "kmod-setup.h"
#ifdef HAVE_KMOD
static void systemd_kmod_log(
diff --git a/src/grp-system/libcore/load-fragment.c b/src/grp-system/libcore/load-fragment.c
index 0f17dc85c2..bb12b6cbfe 100644
--- a/src/grp-system/libcore/load-fragment.c
+++ b/src/grp-system/libcore/load-fragment.c
@@ -33,13 +33,8 @@
#include "basic/af-list.h"
#include "basic/alloc-util.h"
-#include "sd-bus/bus-error.h"
-#include "sd-bus/bus-internal.h"
-#include "shared/bus-util.h"
#include "basic/cap-list.h"
#include "basic/capability-util.h"
-#include "cgroup.h"
-#include "shared/conf-parser.h"
#include "basic/cpu-set-util.h"
#include "basic/env-util.h"
#include "basic/errno-list.h"
@@ -47,13 +42,19 @@
#include "basic/fd-util.h"
#include "basic/fs-util.h"
#include "basic/ioprio.h"
-#include "load-fragment.h"
#include "basic/log.h"
#include "basic/missing.h"
#include "basic/parse-util.h"
#include "basic/path-util.h"
#include "basic/process-util.h"
#include "basic/rlimit-util.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-internal.h"
+#include "shared/bus-util.h"
+#include "shared/conf-parser.h"
+
+#include "cgroup.h"
+#include "load-fragment.h"
#ifdef HAVE_SECCOMP
#include "shared/seccomp-util.h"
#endif
@@ -63,11 +64,12 @@
#include "basic/string-util.h"
#include "basic/strv.h"
#include "basic/unit-name.h"
-#include "unit-printf.h"
-#include "unit.h"
#include "basic/utf8.h"
#include "basic/web-util.h"
+#include "unit-printf.h"
+#include "unit.h"
+
int config_parse_warn_compat(
const char *unit,
const char *filename,
diff --git a/src/grp-system/libcore/manager.c b/src/grp-system/libcore/manager.c
index 2637296c9b..29dbf092d7 100644
--- a/src/grp-system/libcore/manager.c
+++ b/src/grp-system/libcore/manager.c
@@ -40,16 +40,6 @@
#include <systemd/sd-messages.h>
#include "basic/alloc-util.h"
-#include "audit-fd.h"
-#include "shared/boot-timestamps.h"
-#include "sd-bus/bus-common-errors.h"
-#include "sd-bus/bus-error.h"
-#include "sd-bus/bus-kernel.h"
-#include "shared/bus-util.h"
-#include "dbus-job.h"
-#include "dbus-manager.h"
-#include "dbus-unit.h"
-#include "dbus.h"
#include "basic/dirent-util.h"
#include "basic/env-util.h"
#include "basic/escape.h"
@@ -59,15 +49,11 @@
#include "basic/fs-util.h"
#include "basic/hashmap.h"
#include "basic/io-util.h"
-#include "locale-setup.h"
#include "basic/log.h"
#include "basic/macro.h"
-#include "manager.h"
#include "basic/missing.h"
#include "basic/mkdir.h"
-#include "basic/mkdir.h"
#include "basic/parse-util.h"
-#include "shared/path-lookup.h"
#include "basic/path-util.h"
#include "basic/process-util.h"
#include "basic/ratelimit.h"
@@ -80,13 +66,27 @@
#include "basic/strv.h"
#include "basic/terminal-util.h"
#include "basic/time-util.h"
-#include "transaction.h"
#include "basic/umask-util.h"
#include "basic/unit-name.h"
#include "basic/util.h"
#include "basic/virt.h"
+#include "sd-bus/bus-common-errors.h"
+#include "sd-bus/bus-error.h"
+#include "sd-bus/bus-kernel.h"
+#include "shared/boot-timestamps.h"
+#include "shared/bus-util.h"
+#include "shared/path-lookup.h"
#include "shared/watchdog.h"
+#include "audit-fd.h"
+#include "dbus-job.h"
+#include "dbus-manager.h"
+#include "dbus-unit.h"
+#include "dbus.h"
+#include "locale-setup.h"
+#include "manager.h"
+#include "transaction.h"
+
#define NOTIFY_RCVBUF_SIZE (8*1024*1024)
#define CGROUPS_AGENT_RCVBUF_SIZE (8*1024*1024)
diff --git a/src/grp-system/libcore/manager.h b/src/grp-system/libcore/manager.h
index 87186b6e40..fedf39ddcd 100644
--- a/src/grp-system/libcore/manager.h
+++ b/src/grp-system/libcore/manager.h
@@ -68,11 +68,12 @@ typedef enum StatusType {
STATUS_TYPE_EMERGENCY,
} StatusType;
+#include "basic/unit-name.h"
+#include "shared/path-lookup.h"
+
#include "execute.h"
#include "job.h"
-#include "shared/path-lookup.h"
#include "show-status.h"
-#include "basic/unit-name.h"
struct Manager {
/* Note that the set of units we know of is allowed to be
diff --git a/src/grp-system/libcore/selinux-access.c b/src/grp-system/libcore/selinux-access.c
index a259e128c1..ce2ef2db1c 100644
--- a/src/grp-system/libcore/selinux-access.c
+++ b/src/grp-system/libcore/selinux-access.c
@@ -32,14 +32,15 @@
#include <systemd/sd-bus.h>
#include "basic/alloc-util.h"
-#include "audit-fd.h"
-#include "shared/bus-util.h"
#include "basic/log.h"
#include "basic/path-util.h"
#include "basic/selinux-util.h"
#include "basic/stdio-util.h"
#include "basic/strv.h"
#include "basic/util.h"
+#include "shared/bus-util.h"
+
+#include "audit-fd.h"
static bool initialized = false;
diff --git a/src/grp-system/libcore/selinux-setup.c b/src/grp-system/libcore/selinux-setup.c
index 37a143bce4..314d8edbaa 100644
--- a/src/grp-system/libcore/selinux-setup.c
+++ b/src/grp-system/libcore/selinux-setup.c
@@ -27,11 +27,12 @@
#include "basic/log.h"
#include "basic/macro.h"
-#include "selinux-setup.h"
#include "basic/selinux-util.h"
#include "basic/string-util.h"
#include "basic/util.h"
+#include "selinux-setup.h"
+
#ifdef HAVE_SELINUX
_printf_(2,3)
static int null_log(int type, const char *fmt, ...) {
diff --git a/src/grp-udev/hwdb/Makefile b/src/grp-udev/hwdb/Makefile
index 3f89c1ed8f..e3e51d5c74 100644
--- a/src/grp-udev/hwdb/Makefile
+++ b/src/grp-udev/hwdb/Makefile
@@ -20,7 +20,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-include $(dir $(lastword $(MAKEFILE_LIST)))/../config.mk
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
.PHONY: hwdb-update
diff --git a/src/grp-udev/systemd-hwdb/Makefile b/src/grp-udev/systemd-hwdb/Makefile
index 1e5da1d244..ef4e5074ae 100644
--- a/src/grp-udev/systemd-hwdb/Makefile
+++ b/src/grp-udev/systemd-hwdb/Makefile
@@ -20,7 +20,7 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
ifneq ($(ENABLE_HWDB),)
diff --git a/src/libbasic/src/hashmap.c b/src/libbasic/src/hashmap.c
index 0b744c525a..d0cdcc2534 100644
--- a/src/libbasic/src/hashmap.c
+++ b/src/libbasic/src/hashmap.c
@@ -36,6 +36,7 @@
#ifdef ENABLE_DEBUG_HASHMAP
#include <pthread.h>
+
#include "basic/list.h"
#endif
diff --git a/src/libfirewall/firewall-util.c b/src/libfirewall/firewall-util.c
index 212bbe00ee..009cef3e88 100644
--- a/src/libfirewall/firewall-util.c
+++ b/src/libfirewall/firewall-util.c
@@ -32,18 +32,20 @@
#ifndef IFNAMSIZ
#define IFNAMSIZ 16
#endif
+#include <libiptc/libiptc.h>
+
#include <linux/if.h>
#include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/netfilter/nf_nat.h>
#include <linux/netfilter/xt_addrtype.h>
-#include <libiptc/libiptc.h>
#include "basic/alloc-util.h"
-#include "firewall-util.h"
#include "basic/in-addr-util.h"
#include "basic/macro.h"
#include "basic/socket-util.h"
+#include "firewall-util.h"
+
DEFINE_TRIVIAL_CLEANUP_FUNC(struct xtc_handle*, iptc_free);
static int entry_fill_basics(
diff --git a/src/libshared/include/shared/install.h b/src/libshared/include/shared/install.h
index d73dfef4ec..e056d374b6 100644
--- a/src/libshared/include/shared/install.h
+++ b/src/libshared/include/shared/install.h
@@ -19,11 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef enum UnitFileScope UnitFileScope;
-typedef enum UnitFileState UnitFileState;
-typedef enum UnitFilePresetMode UnitFilePresetMode;
-typedef enum UnitFileChangeType UnitFileChangeType;
-typedef enum UnitFileType UnitFileType;
#include <stdbool.h>
#include "basic/hashmap.h"
@@ -31,6 +26,11 @@ typedef enum UnitFileType UnitFileType;
#include "basic/strv.h"
#include "basic/unit-name.h"
+typedef enum UnitFileChangeType UnitFileChangeType;
+typedef enum UnitFilePresetMode UnitFilePresetMode;
+typedef enum UnitFileScope UnitFileScope;
+typedef enum UnitFileState UnitFileState;
+typedef enum UnitFileType UnitFileType;
typedef struct UnitFileChange UnitFileChange;
typedef struct UnitFileInstallInfo UnitFileInstallInfo;
typedef struct UnitFileList UnitFileList;
diff --git a/src/libshared/src/dns-domain.c b/src/libshared/src/dns-domain.c
index 63793edcfa..4d9088e78e 100644
--- a/src/libshared/src/dns-domain.c
+++ b/src/libshared/src/dns-domain.c
@@ -29,7 +29,6 @@
#include <sys/socket.h>
#include "basic/alloc-util.h"
-#include "shared/dns-domain.h"
#include "basic/hashmap.h"
#include "basic/hexdecoct.h"
#include "basic/in-addr-util.h"
@@ -38,6 +37,7 @@
#include "basic/string-util.h"
#include "basic/strv.h"
#include "basic/utf8.h"
+#include "shared/dns-domain.h"
int dns_label_unescape(const char **name, char *dest, size_t sz) {
const char *n;
diff --git a/src/libshared/src/gcrypt-util.c b/src/libshared/src/gcrypt-util.c
index 36ee4b0256..069134a4be 100644
--- a/src/libshared/src/gcrypt-util.c
+++ b/src/libshared/src/gcrypt-util.c
@@ -23,8 +23,7 @@
#include <gcrypt.h>
#include "basic/hexdecoct.h"
-
-#include "gcrypt-util.h"
+#include "shared/gcrypt-util.h"
void initialize_libgcrypt(bool secmem) {
const char *p;
diff --git a/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h b/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h
index 4704c6b440..958a5a18a6 100644
--- a/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h
+++ b/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h
@@ -83,7 +83,6 @@ enum {
};
typedef struct sd_dhcp_client sd_dhcp_client;
-
typedef void (*sd_dhcp_client_callback_t)(sd_dhcp_client *client, int event, void *userdata);
int sd_dhcp_client_set_callback(
sd_dhcp_client *client,
diff --git a/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h b/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h
index 16947079bb..d56497ee59 100644
--- a/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h
+++ b/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h
@@ -75,7 +75,6 @@ enum {
};
typedef struct sd_dhcp6_client sd_dhcp6_client;
-
typedef void (*sd_dhcp6_client_callback_t)(sd_dhcp6_client *client, int event, void *userdata);
int sd_dhcp6_client_set_callback(
sd_dhcp6_client *client,
diff --git a/src/libsystemd-network/include/systemd-network/sd-ndisc.h b/src/libsystemd-network/include/systemd-network/sd-ndisc.h
index 30eb5bc404..9ef96a8aa0 100644
--- a/src/libsystemd-network/include/systemd-network/sd-ndisc.h
+++ b/src/libsystemd-network/include/systemd-network/sd-ndisc.h
@@ -36,7 +36,6 @@ enum {
};
typedef struct sd_ndisc sd_ndisc;
-
typedef void(*sd_ndisc_router_callback_t)(sd_ndisc *nd, uint8_t flags, const struct in6_addr *gateway, unsigned lifetime, int pref, void *userdata);
typedef void(*sd_ndisc_prefix_onlink_callback_t)(sd_ndisc *nd, const struct in6_addr *prefix, unsigned prefixlen,
unsigned lifetime, void *userdata);
diff --git a/src/libsystemd/src/sd-bus/bus-control.c b/src/libsystemd/src/sd-bus/bus-control.c
index 5582a17aae..689b70bc60 100644
--- a/src/libsystemd/src/sd-bus/bus-control.c
+++ b/src/libsystemd/src/sd-bus/bus-control.c
@@ -27,16 +27,17 @@
#include <systemd/sd-bus.h>
#include "basic/alloc-util.h"
-#include "bus-bloom.h"
-#include "bus-control.h"
-#include "bus-internal.h"
-#include "bus-message.h"
-#include "shared/bus-util.h"
#include "basic/capability-util.h"
#include "basic/stdio-util.h"
#include "basic/string-util.h"
#include "basic/strv.h"
#include "basic/user-util.h"
+#include "shared/bus-util.h"
+
+#include "bus-bloom.h"
+#include "bus-control.h"
+#include "bus-internal.h"
+#include "bus-message.h"
_public_ int sd_bus_get_unique_name(sd_bus *bus, const char **unique) {
int r;
diff --git a/src/libsystemd/src/sd-bus/bus-kernel.c b/src/libsystemd/src/sd-bus/bus-kernel.c
index ef9fb87ee5..9d767340b6 100644
--- a/src/libsystemd/src/sd-bus/bus-kernel.c
+++ b/src/libsystemd/src/sd-bus/bus-kernel.c
@@ -33,12 +33,7 @@
#undef basename
#include "basic/alloc-util.h"
-#include "bus-bloom.h"
-#include "bus-internal.h"
-#include "bus-kernel.h"
#include "basic/bus-label.h"
-#include "bus-message.h"
-#include "shared/bus-util.h"
#include "basic/capability-util.h"
#include "basic/fd-util.h"
#include "basic/fileio.h"
@@ -50,6 +45,12 @@
#include "basic/strv.h"
#include "basic/user-util.h"
#include "basic/util.h"
+#include "shared/bus-util.h"
+
+#include "bus-bloom.h"
+#include "bus-internal.h"
+#include "bus-kernel.h"
+#include "bus-message.h"
#define UNIQUE_NAME_MAX (3+DECIMAL_STR_MAX(uint64_t))
diff --git a/src/libsystemd/src/sd-bus/test-bus-gvariant.c b/src/libsystemd/src/sd-bus/test-bus-gvariant.c
index bffc7247c2..5fdf8e661c 100644
--- a/src/libsystemd/src/sd-bus/test-bus-gvariant.c
+++ b/src/libsystemd/src/sd-bus/test-bus-gvariant.c
@@ -24,13 +24,14 @@
#include <systemd/sd-bus.h>
#include "basic/alloc-util.h"
+#include "basic/macro.h"
+#include "basic/util.h"
+#include "shared/bus-util.h"
+
#include "bus-dump.h"
#include "bus-gvariant.h"
#include "bus-internal.h"
#include "bus-message.h"
-#include "shared/bus-util.h"
-#include "basic/macro.h"
-#include "basic/util.h"
static void test_bus_gvariant_is_fixed_size(void) {
assert_se(bus_gvariant_is_fixed_size("") > 0);
diff --git a/src/libsystemd/src/sd-bus/test-bus-marshal.c b/src/libsystemd/src/sd-bus/test-bus-marshal.c
index 59a11718d9..4d8f22b042 100644
--- a/src/libsystemd/src/sd-bus/test-bus-marshal.c
+++ b/src/libsystemd/src/sd-bus/test-bus-marshal.c
@@ -31,14 +31,15 @@
#include <systemd/sd-bus.h>
#include "basic/alloc-util.h"
-#include "bus-dump.h"
#include "basic/bus-label.h"
-#include "bus-message.h"
-#include "shared/bus-util.h"
#include "basic/fd-util.h"
#include "basic/hexdecoct.h"
#include "basic/log.h"
#include "basic/util.h"
+#include "shared/bus-util.h"
+
+#include "bus-dump.h"
+#include "bus-message.h"
static void test_bus_path_encode_unique(void) {
_cleanup_free_ char *a = NULL, *b = NULL, *c = NULL, *d = NULL, *e = NULL;
diff --git a/src/libsystemd/src/sd-journal/audit-type.c b/src/libsystemd/src/sd-journal/audit-type.c
index 1a10a378b2..f4dd1e9417 100644
--- a/src/libsystemd/src/sd-journal/audit-type.c
+++ b/src/libsystemd/src/sd-journal/audit-type.c
@@ -24,7 +24,8 @@
# include <libaudit.h>
#endif
+#include "basic/macro.h"
#include "basic/missing.h"
+
#include "audit-type.h"
#include "audit_type-to-name.h"
-#include "basic/macro.h"
diff --git a/src/libsystemd/src/sd-journal/compress.c b/src/libsystemd/src/sd-journal/compress.c
index f763ceeac8..a96d93c455 100644
--- a/src/libsystemd/src/sd-journal/compress.c
+++ b/src/libsystemd/src/sd-journal/compress.c
@@ -33,16 +33,17 @@
#endif
#include "basic/alloc-util.h"
-#include "compress.h"
#include "basic/fd-util.h"
#include "basic/io-util.h"
-#include "journal-def.h"
#include "basic/macro.h"
#include "basic/sparse-endian.h"
#include "basic/string-table.h"
#include "basic/string-util.h"
#include "basic/util.h"
+#include "compress.h"
+#include "journal-def.h"
+
#ifdef HAVE_LZ4
DEFINE_TRIVIAL_CLEANUP_FUNC(LZ4F_compressionContext_t, LZ4F_freeCompressionContext);
DEFINE_TRIVIAL_CLEANUP_FUNC(LZ4F_decompressionContext_t, LZ4F_freeDecompressionContext);
diff --git a/src/libsystemd/src/sd-journal/journal-file.h b/src/libsystemd/src/sd-journal/journal-file.h
index 366d168166..daafc8ae0d 100644
--- a/src/libsystemd/src/sd-journal/journal-file.h
+++ b/src/libsystemd/src/sd-journal/journal-file.h
@@ -25,15 +25,16 @@
#include <gcrypt.h>
#endif
+#include <systemd/sd-event.h>
#include <systemd/sd-id128.h>
#include "basic/hashmap.h"
-#include "journal-def.h"
#include "basic/macro.h"
-#include "mmap-cache.h"
-#include <systemd/sd-event.h>
#include "basic/sparse-endian.h"
+#include "journal-def.h"
+#include "mmap-cache.h"
+
typedef struct JournalMetrics {
/* For all these: -1 means "pick automatically", and 0 means "no limit enforced" */
uint64_t max_size; /* how large journal files grow at max */
diff --git a/src/systemd-nspawn/nspawn-patch-uid.c b/src/systemd-nspawn/nspawn-patch-uid.c
index 2cdb541ebb..28d2801c69 100644
--- a/src/systemd-nspawn/nspawn-patch-uid.c
+++ b/src/systemd-nspawn/nspawn-patch-uid.c
@@ -27,16 +27,17 @@
#include <sys/vfs.h>
#include <unistd.h>
-#include "shared/acl-util.h"
#include "basic/dirent-util.h"
#include "basic/fd-util.h"
#include "basic/missing.h"
-#include "nspawn-patch-uid.h"
#include "basic/stat-util.h"
#include "basic/stdio-util.h"
#include "basic/string-util.h"
#include "basic/strv.h"
#include "basic/user-util.h"
+#include "shared/acl-util.h"
+
+#include "nspawn-patch-uid.h"
#ifdef HAVE_ACL
diff --git a/src/systemd-nspawn/nspawn.c b/src/systemd-nspawn/nspawn.c
index fc913a2363..5537a526f0 100644
--- a/src/systemd-nspawn/nspawn.c
+++ b/src/systemd-nspawn/nspawn.c
@@ -23,9 +23,10 @@
#include <errno.h>
#include <getopt.h>
#include <grp.h>
-#include <linux/loop.h>
#include <pwd.h>
#include <sched.h>
+
+#include <linux/loop.h>
#ifdef HAVE_SECCOMP
#include <seccomp.h>
#endif
@@ -48,30 +49,37 @@
#include "basic/alloc-util.h"
#include "basic/barrier.h"
-#include "shared/base-filesystem.h"
#include "basic/blkid-util.h"
#include "basic/btrfs-util.h"
#include "basic/cap-list.h"
#include "basic/capability-util.h"
#include "basic/cgroup-util.h"
#include "basic/copy.h"
-#include "shared/dev-setup.h"
#include "basic/env-util.h"
#include "basic/fd-util.h"
#include "basic/fdset.h"
#include "basic/fileio.h"
#include "basic/formats-util.h"
#include "basic/fs-util.h"
-#include "shared/gpt.h"
#include "basic/hostname-util.h"
#include "basic/log.h"
-#include "loopback-setup.h"
-#include "machine-id-setup.h"
-#include "shared/machine-image.h"
#include "basic/macro.h"
#include "basic/missing.h"
#include "basic/mkdir.h"
#include "basic/mount-util.h"
+#include "basic/parse-util.h"
+#include "basic/path-util.h"
+#include "basic/process-util.h"
+#include "basic/random-util.h"
+#include "basic/rm-rf.h"
+#include "shared/base-filesystem.h"
+#include "shared/dev-setup.h"
+#include "shared/gpt.h"
+#include "shared/machine-image.h"
+#include "shared/ptyfwd.h"
+
+#include "loopback-setup.h"
+#include "machine-id-setup.h"
#include "nspawn-cgroup.h"
#include "nspawn-expose-ports.h"
#include "nspawn-mount.h"
@@ -81,12 +89,6 @@
#include "nspawn-settings.h"
#include "nspawn-setuid.h"
#include "nspawn-stub-pid1.h"
-#include "basic/parse-util.h"
-#include "basic/path-util.h"
-#include "basic/process-util.h"
-#include "shared/ptyfwd.h"
-#include "basic/random-util.h"
-#include "basic/rm-rf.h"
#ifdef HAVE_SECCOMP
#include "shared/seccomp-util.h"
#endif
@@ -98,10 +100,10 @@
#include "basic/string-util.h"
#include "basic/strv.h"
#include "basic/terminal-util.h"
-#include "shared/udev-util.h"
#include "basic/umask-util.h"
#include "basic/user-util.h"
#include "basic/util.h"
+#include "shared/udev-util.h"
/* Note that devpts's gid= parameter parses GIDs as signed values, hence we stay away from the upper half of the 32bit
* UID range here */
diff --git a/src/test/test-af-list.c b/src/test/test-af-list.c
index b773de60e7..21115e677a 100644
--- a/src/test/test-af-list.c
+++ b/src/test/test-af-list.c
@@ -26,9 +26,9 @@
static const struct af_name* lookup_af(register const char *str, register unsigned int len);
-#include "af-from-name.h"
+#include "basic/af-from-name.h"
#include "basic/af-list.h"
-#include "af-to-name.h"
+#include "basic/af-to-name.h"
int main(int argc, const char *argv[]) {
diff --git a/src/test/test-arphrd-list.c b/src/test/test-arphrd-list.c
index f24871398e..976958e733 100644
--- a/src/test/test-arphrd-list.c
+++ b/src/test/test-arphrd-list.c
@@ -26,9 +26,9 @@
static const struct arphrd_name* lookup_arphrd(register const char *str, register unsigned int len);
-#include "arphrd-from-name.h"
+#include "basic/arphrd-from-name.h"
#include "basic/arphrd-list.h"
-#include "arphrd-to-name.h"
+#include "basic/arphrd-to-name.h"
int main(int argc, const char *argv[]) {