From ca78ad1de987b800978622a22ac6c5caf628a037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Mar 2019 11:32:41 +0100 Subject: [PATCH] headers: remove unneeded includes from util.h This means we need to include many more headers in various files that simply included util.h before, but it seems cleaner to do it this way. --- src/activate/activate.c | 1 + src/analyze/analyze.c | 1 + src/backlight/backlight.c | 4 ++++ src/basic/glob-util.c | 2 ++ src/basic/in-addr-util.c | 1 + src/basic/mkdir.c | 1 + src/basic/selinux-util.c | 2 ++ src/basic/stat-util.h | 1 + src/basic/strv.h | 2 +- src/basic/util.h | 22 ------------------- src/binfmt/binfmt.c | 3 ++- src/core/dbus-service.c | 1 + src/core/dynamic-user.c | 3 +++ src/core/execute.h | 1 + src/core/ima-setup.c | 4 +++- src/core/loopback-setup.c | 1 + src/core/selinux-access.c | 1 + src/core/selinux-setup.c | 1 + src/core/service.c | 2 ++ src/core/show-status.c | 4 ++++ src/core/smack-setup.c | 1 + src/core/timer.c | 4 ++++ src/coredump/coredump-vacuum.c | 3 +++ src/coredump/stacktrace.c | 2 ++ src/cryptsetup/cryptsetup-generator.c | 3 +++ src/cryptsetup/cryptsetup.c | 3 +++ src/debug-generator/debug-generator.c | 3 ++- src/fuzz/fuzz-dhcp-server.c | 4 ++++ src/fuzz/fuzz-journald-stream.c | 1 + .../hibernate-resume-generator.c | 2 +- src/hostname/hostnamed.c | 2 ++ src/import/curl-util.c | 2 ++ src/import/curl-util.h | 1 + src/import/export.c | 1 + src/import/import-fs.c | 1 + src/import/import.c | 1 + src/import/pull-job.c | 2 ++ src/import/pull.c | 1 + src/import/test-qcow2.c | 5 ++++- src/initctl/initctl.c | 2 ++ src/journal-remote/journal-gatewayd.c | 2 ++ src/journal/catalog.c | 2 ++ src/journal/catalog.h | 1 + src/journal/compress.c | 2 ++ src/journal/journal-authenticate.c | 1 + src/journal/journal-file.h | 2 +- src/journal/journald-context.h | 2 ++ src/journal/journald-rate-limit.c | 2 +- src/journal/journald-rate-limit.h | 2 +- src/journal/journald-server.h | 1 + src/journal/test-compress.c | 2 ++ src/journal/test-journal-flush.c | 1 + src/libsystemd-network/dhcp-server-internal.h | 2 +- src/libsystemd-network/ndisc-internal.h | 1 + src/libsystemd-network/sd-dhcp-lease.c | 3 +++ src/libsystemd-network/sd-ipv4acd.c | 2 +- src/libsystemd-network/test-ndisc-ra.c | 1 + src/libsystemd-network/test-ndisc-rs.c | 1 + src/libsystemd/sd-bus/bus-convenience.c | 3 +++ src/libsystemd/sd-bus/bus-internal.h | 2 +- src/libsystemd/sd-bus/test-bus-benchmark.c | 1 + src/libsystemd/sd-device/device-enumerator.c | 3 +++ src/libsystemd/sd-device/test-sd-device.c | 2 +- src/libsystemd/sd-hwdb/hwdb-util.c | 1 + src/libsystemd/sd-hwdb/sd-hwdb.c | 2 ++ src/libsystemd/sd-login/test-login.c | 1 + src/libsystemd/sd-netlink/netlink-internal.h | 1 + .../sd-netlink/test-local-addresses.c | 2 ++ src/locale/keymap-util.c | 2 ++ src/locale/localed.c | 2 ++ src/login/logind-dbus.c | 1 + src/login/logind-inhibit.c | 2 ++ src/login/logind-seat.c | 1 + src/login/logind-session.c | 1 + src/login/logind.h | 1 + src/login/pam_systemd.c | 4 +++- src/login/user-runtime-dir.c | 1 + src/machine/machine.c | 1 + src/machine/machine.h | 1 + src/machine/machined.c | 2 ++ src/mount/mount-tool.c | 1 + src/network/networkctl.c | 3 +++ src/network/networkd-manager.c | 1 + src/network/networkd-ndisc.h | 1 + src/network/networkd.c | 3 +++ src/network/wait-online/manager.h | 1 + src/network/wait-online/wait-online.c | 2 ++ src/nspawn/nspawn-cgroup.c | 1 + src/nspawn/nspawn-mount.c | 1 + src/nspawn/nspawn-oci.c | 1 + src/nspawn/nspawn-seccomp.c | 1 + src/nspawn/nspawn-settings.h | 1 + src/nspawn/nspawn-setuid.c | 1 + src/nss-mymachines/nss-mymachines.c | 1 + src/nss-resolve/nss-resolve.c | 2 ++ src/nss-systemd/nss-systemd.c | 1 + src/partition/growfs.c | 1 + src/portable/portabled-image-bus.c | 5 +++++ src/portable/portabled.c | 3 +++ src/quotacheck/quotacheck.c | 2 ++ src/resolve/resolvectl.c | 1 + src/resolve/resolved-dns-answer.c | 2 ++ src/resolve/resolved-dns-rr.h | 1 + src/resolve/resolved-etc-hosts.c | 4 ++++ src/resolve/resolved-manager.c | 4 ++++ src/resolve/resolved-resolv-conf.c | 3 +++ src/resolve/resolved.c | 4 ++++ src/rfkill/rfkill.c | 4 ++++ src/run-generator/run-generator.c | 2 ++ src/run/run.c | 3 +++ src/shared/acl-util.c | 2 ++ src/shared/bootspec.c | 2 ++ src/shared/bus-util.h | 1 + src/shared/format-table.c | 1 + src/shared/json.c | 1 + src/shared/json.h | 3 ++- src/shared/pager.c | 1 + src/shared/serialize.h | 1 + src/shared/sleep-config.c | 3 +++ src/shared/specifier.c | 1 + src/shutdown/umount.c | 3 +++ src/sleep/sleep.c | 5 +++++ src/sysctl/sysctl.c | 3 ++- src/systemctl/sysv-compat.c | 4 ++++ src/test/test-async.c | 1 + src/test/test-barrier.c | 1 + src/test/test-boot-timestamps.c | 3 +++ src/test/test-cap-list.c | 1 + src/test/test-daemon.c | 1 + src/test/test-date.c | 2 +- src/test/test-fstab-util.c | 3 ++- src/test/test-hashmap-plain.c | 1 + src/test/test-hostname-util.c | 2 ++ src/test/test-id128.c | 3 +++ src/test/test-install-root.c | 2 ++ src/test/test-locale-util.c | 1 + src/test/test-mountpoint-util.c | 1 + src/test/test-namespace.c | 1 + src/test/test-netlink-manual.c | 2 ++ src/test/test-nss.c | 1 + src/test/test-pretty-print.c | 3 +++ src/test/test-replace-var.c | 3 +-- src/test/test-rlimit-util.c | 2 +- src/test/test-sleep.c | 4 ++++ src/test/test-socket-util.c | 5 +++-- src/test/test-string-util.c | 1 + src/test/test-terminal-util.c | 2 ++ src/test/test-unit-file.c | 1 + src/test/test-unit-name.c | 1 + src/test/test-user-util.c | 4 ++-- src/test/test-verbs.c | 2 ++ src/timedate/timedated.c | 2 ++ src/timesync/timesyncd-manager.c | 1 + src/timesync/timesyncd.c | 3 +++ .../tty-ask-password-agent.c | 4 +++- src/udev/udevadm-monitor.c | 1 + src/update-done/update-done.c | 6 ++++- src/update-utmp/update-utmp.c | 2 ++ src/user-sessions/user-sessions.c | 4 +++- src/vconsole/vconsole-setup.c | 2 ++ 160 files changed, 290 insertions(+), 50 deletions(-) diff --git a/src/activate/activate.c b/src/activate/activate.c index 35ab08f22d..0b96344038 100644 --- a/src/activate/activate.c +++ b/src/activate/activate.c @@ -22,6 +22,7 @@ #include "string-util.h" #include "strv.h" #include "terminal-util.h" +#include "util.h" static char** arg_listen = NULL; static bool arg_accept = false; diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c index a3b9a1de3a..87c5f0e43c 100644 --- a/src/analyze/analyze.c +++ b/src/analyze/analyze.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "sd-bus.h" diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c index 2fcc693c48..28a1a903d1 100644 --- a/src/backlight/backlight.c +++ b/src/backlight/backlight.c @@ -1,5 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include +#include + #include "sd-device.h" #include "alloc-util.h" diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c index 9fac676f2b..32c53f8c73 100644 --- a/src/basic/glob-util.c +++ b/src/basic/glob-util.c @@ -4,6 +4,8 @@ #include #include #include +#include +#include #include "dirent-util.h" #include "glob-util.h" diff --git a/src/basic/in-addr-util.c b/src/basic/in-addr-util.c index f5cabc6534..1d5c6412b5 100644 --- a/src/basic/in-addr-util.c +++ b/src/basic/in-addr-util.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include "alloc-util.h" diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c index 4bb65d5838..6b82eab640 100644 --- a/src/basic/mkdir.c +++ b/src/basic/mkdir.c @@ -6,6 +6,7 @@ #include #include "alloc-util.h" +#include "format-util.h" #include "fs-util.h" #include "macro.h" #include "mkdir.h" diff --git a/src/basic/selinux-util.c b/src/basic/selinux-util.c index 375da920f7..f35e760233 100644 --- a/src/basic/selinux-util.c +++ b/src/basic/selinux-util.c @@ -1,11 +1,13 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include #include #include #include #include #include +#include #include #include diff --git a/src/basic/stat-util.h b/src/basic/stat-util.h index 5aca17c04a..7824af3500 100644 --- a/src/basic/stat-util.h +++ b/src/basic/stat-util.h @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once +#include #include #include #include diff --git a/src/basic/strv.h b/src/basic/strv.h index 392cab65be..aa5f95ab72 100644 --- a/src/basic/strv.h +++ b/src/basic/strv.h @@ -5,12 +5,12 @@ #include #include #include +#include #include "alloc-util.h" #include "extract-word.h" #include "macro.h" #include "string-util.h" -#include "util.h" char *strv_find(char **l, const char *name) _pure_; char *strv_find_prefix(char **l, const char *name) _pure_; diff --git a/src/basic/util.h b/src/basic/util.h index 412563fa8e..25e6ab8112 100644 --- a/src/basic/util.h +++ b/src/basic/util.h @@ -1,31 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "format-util.h" #include "macro.h" -#include "time-util.h" static inline const char* yes_no(bool b) { return b ? "yes" : "no"; diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c index af31f0967e..66e2f0131c 100644 --- a/src/binfmt/binfmt.c +++ b/src/binfmt/binfmt.c @@ -7,6 +7,8 @@ #include #include #include +#include +#include #include "alloc-util.h" #include "conf-files.h" @@ -20,7 +22,6 @@ #include "pretty-print.h" #include "string-util.h" #include "strv.h" -#include "util.h" static bool arg_cat_config = false; static PagerFlags arg_pager_flags = 0; diff --git a/src/core/dbus-service.c b/src/core/dbus-service.c index 0eb336cf03..8f3ebd3f6a 100644 --- a/src/core/dbus-service.c +++ b/src/core/dbus-service.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include #include "alloc-util.h" #include "async.h" diff --git a/src/core/dynamic-user.c b/src/core/dynamic-user.c index 7b00ee4bda..c380bee9e5 100644 --- a/src/core/dynamic-user.c +++ b/src/core/dynamic-user.c @@ -3,11 +3,14 @@ #include #include #include +#include +#include #include "clean-ipc.h" #include "dynamic-user.h" #include "fd-util.h" #include "fileio.h" +#include "format-util.h" #include "fs-util.h" #include "io-util.h" #include "nscd-flush.h" diff --git a/src/core/execute.h b/src/core/execute.h index 214dd64bbd..b9c0f28f99 100644 --- a/src/core/execute.h +++ b/src/core/execute.h @@ -19,6 +19,7 @@ typedef struct Manager Manager; #include "missing_resource.h" #include "namespace.h" #include "nsflags.h" +#include "time-util.h" #define EXEC_STDIN_DATA_MAX (64U*1024U*1024U) diff --git a/src/core/ima-setup.c b/src/core/ima-setup.c index fd7c5f64af..17072b09af 100644 --- a/src/core/ima-setup.c +++ b/src/core/ima-setup.c @@ -5,6 +5,9 @@ ***/ #include +#include +#include +#include #include #include "alloc-util.h" @@ -12,7 +15,6 @@ #include "fileio.h" #include "ima-setup.h" #include "log.h" -#include "util.h" #define IMA_SECFS_DIR "/sys/kernel/security/ima" #define IMA_SECFS_POLICY IMA_SECFS_DIR "/policy" diff --git a/src/core/loopback-setup.c b/src/core/loopback-setup.c index f613db83ce..2a2fb8b59c 100644 --- a/src/core/loopback-setup.c +++ b/src/core/loopback-setup.c @@ -8,6 +8,7 @@ #include "loopback-setup.h" #include "missing.h" #include "netlink-util.h" +#include "time-util.h" #define LOOPBACK_SETUP_TIMEOUT_USEC (5 * USEC_PER_SEC) diff --git a/src/core/selinux-access.c b/src/core/selinux-access.c index 60d7e1d898..c8b1a8588b 100644 --- a/src/core/selinux-access.c +++ b/src/core/selinux-access.c @@ -17,6 +17,7 @@ #include "alloc-util.h" #include "audit-fd.h" #include "bus-util.h" +#include "format-util.h" #include "log.h" #include "path-util.h" #include "selinux-util.h" diff --git a/src/core/selinux-setup.c b/src/core/selinux-setup.c index bac1aa3ff6..b8a94a52ab 100644 --- a/src/core/selinux-setup.c +++ b/src/core/selinux-setup.c @@ -13,6 +13,7 @@ #include "selinux-setup.h" #include "selinux-util.h" #include "string-util.h" +#include "time-util.h" #include "util.h" #if HAVE_SELINUX diff --git a/src/core/service.c b/src/core/service.c index 89029b6d11..0951f7df4e 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2,6 +2,8 @@ #include #include +#include +#include #include #include "sd-messages.h" diff --git a/src/core/show-status.c b/src/core/show-status.c index f748a82084..02601e52db 100644 --- a/src/core/show-status.c +++ b/src/core/show-status.c @@ -1,5 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include +#include + #include "alloc-util.h" #include "fd-util.h" #include "io-util.h" diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c index 49b37aefc7..cd7fb01416 100644 --- a/src/core/smack-setup.c +++ b/src/core/smack-setup.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "alloc-util.h" #include "dirent-util.h" diff --git a/src/core/timer.c b/src/core/timer.c index d1e351c30d..4b8fbfb5cd 100644 --- a/src/core/timer.c +++ b/src/core/timer.c @@ -1,5 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include +#include + #include #include "alloc-util.h" diff --git a/src/coredump/coredump-vacuum.c b/src/coredump/coredump-vacuum.c index 73fd420f3d..35885dfb47 100644 --- a/src/coredump/coredump-vacuum.c +++ b/src/coredump/coredump-vacuum.c @@ -1,6 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include +#include +#include #include "alloc-util.h" #include "coredump-vacuum.h" diff --git a/src/coredump/stacktrace.c b/src/coredump/stacktrace.c index dab4c1ad9b..ab1ac12a23 100644 --- a/src/coredump/stacktrace.c +++ b/src/coredump/stacktrace.c @@ -3,6 +3,8 @@ #include #include #include +#include +#include #include "alloc-util.h" #include "fd-util.h" diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index ea18e84f31..5ae1fca2af 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -1,7 +1,10 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include #include +#include +#include #include "alloc-util.h" #include "dropin.h" diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index 1f0e34b038..864d6ff472 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -4,6 +4,9 @@ #include #include #include +#include +#include +#include #include "sd-device.h" diff --git a/src/debug-generator/debug-generator.c b/src/debug-generator/debug-generator.c index fa4ca57bbf..1b5fb2a28d 100644 --- a/src/debug-generator/debug-generator.c +++ b/src/debug-generator/debug-generator.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include + #include "alloc-util.h" #include "generator.h" #include "mkdir.h" @@ -9,7 +11,6 @@ #include "string-util.h" #include "strv.h" #include "unit-name.h" -#include "util.h" static const char *arg_dest = NULL; static char *arg_default_unit = NULL; diff --git a/src/fuzz/fuzz-dhcp-server.c b/src/fuzz/fuzz-dhcp-server.c index 01fe350ca5..71bb99a381 100644 --- a/src/fuzz/fuzz-dhcp-server.c +++ b/src/fuzz/fuzz-dhcp-server.c @@ -1,5 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include +#include + #include "fuzz.h" #include "sd-dhcp-server.c" diff --git a/src/fuzz/fuzz-journald-stream.c b/src/fuzz/fuzz-journald-stream.c index bc53964139..0991b287c9 100644 --- a/src/fuzz/fuzz-journald-stream.c +++ b/src/fuzz/fuzz-journald-stream.c @@ -2,6 +2,7 @@ #include #include +#include #include "fd-util.h" #include "fuzz.h" diff --git a/src/hibernate-resume/hibernate-resume-generator.c b/src/hibernate-resume/hibernate-resume-generator.c index 8b127ca85c..02eb0c9a51 100644 --- a/src/hibernate-resume/hibernate-resume-generator.c +++ b/src/hibernate-resume/hibernate-resume-generator.c @@ -2,6 +2,7 @@ #include #include +#include #include "alloc-util.h" #include "fstab-util.h" @@ -13,7 +14,6 @@ #include "special.h" #include "string-util.h" #include "unit-name.h" -#include "util.h" static const char *arg_dest = "/tmp"; static char *arg_resume_device = NULL; diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c index 058a71b109..c35ef55662 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -3,6 +3,8 @@ #include #include #include +#include +#include #include #include "alloc-util.h" diff --git a/src/import/curl-util.c b/src/import/curl-util.c index 7db03b2919..cd6822f8db 100644 --- a/src/import/curl-util.c +++ b/src/import/curl-util.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include + #include "alloc-util.h" #include "build.h" #include "curl-util.h" diff --git a/src/import/curl-util.h b/src/import/curl-util.h index a03e844030..6a7be6421c 100644 --- a/src/import/curl-util.h +++ b/src/import/curl-util.h @@ -7,6 +7,7 @@ #include "sd-event.h" #include "hashmap.h" +#include "time-util.h" typedef struct CurlGlue CurlGlue; diff --git a/src/import/export.c b/src/import/export.c index 490710678f..4566a66a15 100644 --- a/src/import/export.c +++ b/src/import/export.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include #include "sd-event.h" #include "sd-id128.h" diff --git a/src/import/import-fs.c b/src/import/import-fs.c index 35ba6ba382..974c0f5536 100644 --- a/src/import/import-fs.c +++ b/src/import/import-fs.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include #include "alloc-util.h" #include "btrfs-util.h" diff --git a/src/import/import.c b/src/import/import.c index f34244acff..e3a1ae8a8b 100644 --- a/src/import/import.c +++ b/src/import/import.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include #include "sd-event.h" #include "sd-id128.h" diff --git a/src/import/pull-job.c b/src/import/pull-job.c index 6881bd627f..9f759a77e0 100644 --- a/src/import/pull-job.c +++ b/src/import/pull-job.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include #include #include "alloc-util.h" diff --git a/src/import/pull.c b/src/import/pull.c index 3376992588..68b1221b72 100644 --- a/src/import/pull.c +++ b/src/import/pull.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include #include "sd-event.h" #include "sd-id128.h" diff --git a/src/import/test-qcow2.c b/src/import/test-qcow2.c index bd2b458219..1703cfd167 100644 --- a/src/import/test-qcow2.c +++ b/src/import/test-qcow2.c @@ -1,9 +1,12 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include +#include + #include "fd-util.h" #include "log.h" #include "qcow2-util.h" -#include "util.h" int main(int argc, char *argv[]) { _cleanup_close_ int sfd = -1, dfd = -1; diff --git a/src/initctl/initctl.c b/src/initctl/initctl.c index 651e70c7fa..96ea942b52 100644 --- a/src/initctl/initctl.c +++ b/src/initctl/initctl.c @@ -4,6 +4,8 @@ #include #include #include +#include +#include #include #include "sd-bus.h" diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c index af45fa549a..734e8c7f33 100644 --- a/src/journal-remote/journal-gatewayd.c +++ b/src/journal-remote/journal-gatewayd.c @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include #include "sd-bus.h" diff --git a/src/journal/catalog.c b/src/journal/catalog.c index 21c0eaac9f..7beffc1e1a 100644 --- a/src/journal/catalog.c +++ b/src/journal/catalog.c @@ -6,6 +6,8 @@ #include #include #include +#include +#include #include #include "sd-id128.h" diff --git a/src/journal/catalog.h b/src/journal/catalog.h index 4e6f161af3..20497d118f 100644 --- a/src/journal/catalog.h +++ b/src/journal/catalog.h @@ -2,6 +2,7 @@ #pragma once #include +#include #include "sd-id128.h" diff --git a/src/journal/compress.c b/src/journal/compress.c index e95ce2bcaa..7a79e566b8 100644 --- a/src/journal/compress.c +++ b/src/journal/compress.c @@ -4,6 +4,8 @@ #include #include #include +#include +#include #include #if HAVE_XZ diff --git a/src/journal/journal-authenticate.c b/src/journal/journal-authenticate.c index a5ee10c3bc..da275c2512 100644 --- a/src/journal/journal-authenticate.c +++ b/src/journal/journal-authenticate.c @@ -11,6 +11,7 @@ #include "journal-def.h" #include "journal-file.h" #include "memory-util.h" +#include "time-util.h" static uint64_t journal_file_tag_seqnum(JournalFile *f) { uint64_t r; diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h index 29e324d8cf..c9036d3e02 100644 --- a/src/journal/journal-file.h +++ b/src/journal/journal-file.h @@ -12,9 +12,9 @@ #include "hashmap.h" #include "journal-def.h" -#include "macro.h" #include "mmap-cache.h" #include "sparse-endian.h" +#include "time-util.h" typedef struct JournalMetrics { /* For all these: -1 means "pick automatically", and 0 means "no limit enforced" */ diff --git a/src/journal/journald-context.h b/src/journal/journald-context.h index 5e19c71f14..c3a5df0d98 100644 --- a/src/journal/journald-context.h +++ b/src/journal/journald-context.h @@ -6,6 +6,8 @@ #include "sd-id128.h" +#include "time-util.h" + typedef struct ClientContext ClientContext; #include "journald-server.h" diff --git a/src/journal/journald-rate-limit.c b/src/journal/journald-rate-limit.c index 0b42d53760..39e968bce3 100644 --- a/src/journal/journald-rate-limit.c +++ b/src/journal/journald-rate-limit.c @@ -9,7 +9,7 @@ #include "list.h" #include "random-util.h" #include "string-util.h" -#include "util.h" +#include "time-util.h" #define POOLS_MAX 5 #define BUCKETS_MAX 127 diff --git a/src/journal/journald-rate-limit.h b/src/journal/journald-rate-limit.h index a2992800fe..9dab51f7cc 100644 --- a/src/journal/journald-rate-limit.h +++ b/src/journal/journald-rate-limit.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once -#include "util.h" +#include "time-util.h" typedef struct JournalRateLimit JournalRateLimit; diff --git a/src/journal/journald-server.h b/src/journal/journald-server.h index 3f6b42ddd5..5f0b3dd4ac 100644 --- a/src/journal/journald-server.h +++ b/src/journal/journald-server.h @@ -16,6 +16,7 @@ typedef struct Server Server; #include "journald-stream.h" #include "list.h" #include "prioq.h" +#include "time-util.h" typedef enum Storage { STORAGE_AUTO, diff --git a/src/journal/test-compress.c b/src/journal/test-compress.c index 0920833c12..fac2b43c47 100644 --- a/src/journal/test-compress.c +++ b/src/journal/test-compress.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include + #if HAVE_LZ4 #include #endif diff --git a/src/journal/test-journal-flush.c b/src/journal/test-journal-flush.c index 81dbc22a70..566674d6b0 100644 --- a/src/journal/test-journal-flush.c +++ b/src/journal/test-journal-flush.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include #include "sd-journal.h" diff --git a/src/libsystemd-network/dhcp-server-internal.h b/src/libsystemd-network/dhcp-server-internal.h index 8a7c5bc28f..b30be7e5b2 100644 --- a/src/libsystemd-network/dhcp-server-internal.h +++ b/src/libsystemd-network/dhcp-server-internal.h @@ -11,7 +11,7 @@ #include "dhcp-internal.h" #include "hashmap.h" #include "log.h" -#include "util.h" +#include "time-util.h" typedef struct DHCPClientId { size_t length; diff --git a/src/libsystemd-network/ndisc-internal.h b/src/libsystemd-network/ndisc-internal.h index 0c04fea8e5..28f801cd7f 100644 --- a/src/libsystemd-network/ndisc-internal.h +++ b/src/libsystemd-network/ndisc-internal.h @@ -6,6 +6,7 @@ ***/ #include "log.h" +#include "time-util.h" #include "sd-ndisc.h" diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/sd-dhcp-lease.c index f48581308c..a16314a9d3 100644 --- a/src/libsystemd-network/sd-dhcp-lease.c +++ b/src/libsystemd-network/sd-dhcp-lease.c @@ -9,6 +9,9 @@ #include #include #include +#include +#include +#include #include "sd-dhcp-lease.h" diff --git a/src/libsystemd-network/sd-ipv4acd.c b/src/libsystemd-network/sd-ipv4acd.c index 59359aec79..c8e34497fd 100644 --- a/src/libsystemd-network/sd-ipv4acd.c +++ b/src/libsystemd-network/sd-ipv4acd.c @@ -21,7 +21,7 @@ #include "random-util.h" #include "siphash24.h" #include "string-util.h" -#include "util.h" +#include "time-util.h" /* Constants from the RFC */ #define PROBE_WAIT_USEC (1U * USEC_PER_SEC) diff --git a/src/libsystemd-network/test-ndisc-ra.c b/src/libsystemd-network/test-ndisc-ra.c index c4c1c81140..7dc44e5674 100644 --- a/src/libsystemd-network/test-ndisc-ra.c +++ b/src/libsystemd-network/test-ndisc-ra.c @@ -5,6 +5,7 @@ #include #include +#include #include "sd-radv.h" diff --git a/src/libsystemd-network/test-ndisc-rs.c b/src/libsystemd-network/test-ndisc-rs.c index caf94d10f8..c8ee1ec31d 100644 --- a/src/libsystemd-network/test-ndisc-rs.c +++ b/src/libsystemd-network/test-ndisc-rs.c @@ -5,6 +5,7 @@ #include #include +#include #include "sd-ndisc.h" diff --git a/src/libsystemd/sd-bus/bus-convenience.c b/src/libsystemd/sd-bus/bus-convenience.c index c4d4016fc0..4ec061644d 100644 --- a/src/libsystemd/sd-bus/bus-convenience.c +++ b/src/libsystemd/sd-bus/bus-convenience.c @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include + #include "bus-internal.h" #include "bus-message.h" #include "bus-signature.h" diff --git a/src/libsystemd/sd-bus/bus-internal.h b/src/libsystemd/sd-bus/bus-internal.h index c73860fb65..831c257978 100644 --- a/src/libsystemd/sd-bus/bus-internal.h +++ b/src/libsystemd/sd-bus/bus-internal.h @@ -14,7 +14,7 @@ #include "list.h" #include "prioq.h" #include "socket-util.h" -#include "util.h" +#include "time-util.h" /* Note that we use the new /run prefix here (instead of /var/run) since we require them to be aliases and * that way we become independent of /var being mounted */ diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c index 2dd3d41a30..8de0a859ee 100644 --- a/src/libsystemd/sd-bus/test-bus-benchmark.c +++ b/src/libsystemd/sd-bus/test-bus-benchmark.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include #include "sd-bus.h" diff --git a/src/libsystemd/sd-device/device-enumerator.c b/src/libsystemd/sd-device/device-enumerator.c index 8f2764490a..4da6e65210 100644 --- a/src/libsystemd/sd-device/device-enumerator.c +++ b/src/libsystemd/sd-device/device-enumerator.c @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include + #include "sd-device.h" #include "alloc-util.h" diff --git a/src/libsystemd/sd-device/test-sd-device.c b/src/libsystemd/sd-device/test-sd-device.c index e459b13b96..33a25d576a 100644 --- a/src/libsystemd/sd-device/test-sd-device.c +++ b/src/libsystemd/sd-device/test-sd-device.c @@ -6,7 +6,7 @@ #include "hashmap.h" #include "string-util.h" #include "tests.h" -#include "util.h" +#include "time-util.h" static void test_sd_device_one(sd_device *d) { const char *syspath, *subsystem, *val; diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c index dd9bf9e18d..2ac4b59ad7 100644 --- a/src/libsystemd/sd-hwdb/hwdb-util.c +++ b/src/libsystemd/sd-hwdb/hwdb-util.c @@ -2,6 +2,7 @@ #include #include +#include #include "alloc-util.h" #include "conf-files.h" diff --git a/src/libsystemd/sd-hwdb/sd-hwdb.c b/src/libsystemd/sd-hwdb/sd-hwdb.c index 77531d9505..79fe1a83a7 100644 --- a/src/libsystemd/sd-hwdb/sd-hwdb.c +++ b/src/libsystemd/sd-hwdb/sd-hwdb.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "sd-hwdb.h" @@ -20,6 +21,7 @@ #include "hwdb-util.h" #include "nulstr-util.h" #include "string-util.h" +#include "time-util.h" struct sd_hwdb { unsigned n_ref; diff --git a/src/libsystemd/sd-login/test-login.c b/src/libsystemd/sd-login/test-login.c index 1789e547b8..e9df5f8bc5 100644 --- a/src/libsystemd/sd-login/test-login.c +++ b/src/libsystemd/sd-login/test-login.c @@ -11,6 +11,7 @@ #include "log.h" #include "string-util.h" #include "strv.h" +#include "time-util.h" #include "util.h" static char* format_uids(char **buf, uid_t* uids, int count) { diff --git a/src/libsystemd/sd-netlink/netlink-internal.h b/src/libsystemd/sd-netlink/netlink-internal.h index a8af3fc63b..4a366d421f 100644 --- a/src/libsystemd/sd-netlink/netlink-internal.h +++ b/src/libsystemd/sd-netlink/netlink-internal.h @@ -8,6 +8,7 @@ #include "list.h" #include "netlink-types.h" #include "prioq.h" +#include "time-util.h" #define RTNL_DEFAULT_TIMEOUT ((usec_t) (25 * USEC_PER_SEC)) diff --git a/src/libsystemd/sd-netlink/test-local-addresses.c b/src/libsystemd/sd-netlink/test-local-addresses.c index 17114265d7..37505ea783 100644 --- a/src/libsystemd/sd-netlink/test-local-addresses.c +++ b/src/libsystemd/sd-netlink/test-local-addresses.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include + #include "af-list.h" #include "alloc-util.h" #include "in-addr-util.h" diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c index 67f33612de..76d8a4e041 100644 --- a/src/locale/keymap-util.c +++ b/src/locale/keymap-util.c @@ -3,6 +3,8 @@ #include #include #include +#include +#include #include #include "bus-util.h" diff --git a/src/locale/localed.c b/src/locale/localed.c index f851d35a08..8d0eec96a5 100644 --- a/src/locale/localed.c +++ b/src/locale/localed.c @@ -2,6 +2,8 @@ #include #include +#include +#include #include #if HAVE_XKBCOMMON diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 5f82b21995..3ea1823238 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include "sd-device.h" diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c index 415c26b147..1bee58db12 100644 --- a/src/login/logind-inhibit.c +++ b/src/login/logind-inhibit.c @@ -3,6 +3,8 @@ #include #include #include +#include +#include #include #include "alloc-util.h" diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index a6d88f8e7b..b4904c37d5 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include "sd-messages.h" diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 90a9108566..a7924235b4 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "sd-messages.h" diff --git a/src/login/logind.h b/src/login/logind.h index 7b774f49e0..7b6f73c6ec 100644 --- a/src/login/logind.h +++ b/src/login/logind.h @@ -11,6 +11,7 @@ #include "hashmap.h" #include "list.h" #include "set.h" +#include "time-util.h" typedef struct Manager Manager; diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c index 864b358eb9..372ba44874 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c @@ -10,6 +10,9 @@ #include #include #include +#include +#include +#include #include "alloc-util.h" #include "audit-util.h" @@ -31,7 +34,6 @@ #include "stdio-util.h" #include "strv.h" #include "terminal-util.h" -#include "util.h" static int parse_argv( pam_handle_t *handle, diff --git a/src/login/user-runtime-dir.c b/src/login/user-runtime-dir.c index eb66e18de1..c8a5625605 100644 --- a/src/login/user-runtime-dir.c +++ b/src/login/user-runtime-dir.c @@ -7,6 +7,7 @@ #include "bus-error.h" #include "fs-util.h" +#include "format-util.h" #include "label.h" #include "main-func.h" #include "mkdir.h" diff --git a/src/machine/machine.c b/src/machine/machine.c index 4f89ac026d..84454ddd86 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -4,6 +4,7 @@ #include #include #include +#include #include "sd-messages.h" diff --git a/src/machine/machine.h b/src/machine/machine.h index 31527d029b..9ff9a65671 100644 --- a/src/machine/machine.h +++ b/src/machine/machine.h @@ -7,6 +7,7 @@ typedef enum KillWho KillWho; #include "list.h" #include "machined.h" #include "operation.h" +#include "time-util.h" typedef enum MachineState { MACHINE_OPENING, /* Machine is being registered */ diff --git a/src/machine/machined.c b/src/machine/machined.c index 0b92b1c6ee..a3bed035dc 100644 --- a/src/machine/machined.c +++ b/src/machine/machined.c @@ -2,6 +2,8 @@ #include #include +#include +#include #include #include "sd-daemon.h" diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c index 6256920e99..b290095b0e 100644 --- a/src/mount/mount-tool.c +++ b/src/mount/mount-tool.c @@ -14,6 +14,7 @@ #include "escape.h" #include "fd-util.h" #include "fileio.h" +#include "format-util.h" #include "fs-util.h" #include "fstab-util.h" #include "main-func.h" diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 86f6435e4f..3881aaa42b 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -4,6 +4,9 @@ #include #include #include +#include +#include +#include #include "sd-device.h" #include "sd-hwdb.h" diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index 53d1cfb446..9075b0a14b 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -4,6 +4,7 @@ #include #include #include +#include #include "sd-daemon.h" #include "sd-netlink.h" diff --git a/src/network/networkd-ndisc.h b/src/network/networkd-ndisc.h index 762f42d43e..0b614bf50f 100644 --- a/src/network/networkd-ndisc.h +++ b/src/network/networkd-ndisc.h @@ -2,6 +2,7 @@ #pragma once #include "networkd-link.h" +#include "time-util.h" typedef struct NDiscRDNSS { usec_t valid_until; diff --git a/src/network/networkd.c b/src/network/networkd.c index fcecafe083..4b04aa0463 100644 --- a/src/network/networkd.c +++ b/src/network/networkd.c @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include + #include "sd-daemon.h" #include "sd-event.h" diff --git a/src/network/wait-online/manager.h b/src/network/wait-online/manager.h index eb81e106e1..e559dd168d 100644 --- a/src/network/wait-online/manager.h +++ b/src/network/wait-online/manager.h @@ -7,6 +7,7 @@ #include "hashmap.h" #include "network-util.h" +#include "time-util.h" typedef struct Manager Manager; typedef struct Link Link; diff --git a/src/network/wait-online/wait-online.c b/src/network/wait-online/wait-online.c index a5eddf3ca2..fd7a48d81d 100644 --- a/src/network/wait-online/wait-online.c +++ b/src/network/wait-online/wait-online.c @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include +#include #include "sd-daemon.h" diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c index 4a16f56d1c..168125d311 100644 --- a/src/nspawn/nspawn-cgroup.c +++ b/src/nspawn/nspawn-cgroup.c @@ -5,6 +5,7 @@ #include "alloc-util.h" #include "fd-util.h" #include "fileio.h" +#include "format-util.h" #include "fs-util.h" #include "mkdir.h" #include "mount-util.h" diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c index 42153c5a11..5a1bce4abc 100644 --- a/src/nspawn/nspawn-mount.c +++ b/src/nspawn/nspawn-mount.c @@ -6,6 +6,7 @@ #include "alloc-util.h" #include "escape.h" #include "fd-util.h" +#include "format-util.h" #include "fs-util.h" #include "label.h" #include "mkdir.h" diff --git a/src/nspawn/nspawn-oci.c b/src/nspawn/nspawn-oci.c index 6c35c926ab..db8e4d3b78 100644 --- a/src/nspawn/nspawn-oci.c +++ b/src/nspawn/nspawn-oci.c @@ -9,6 +9,7 @@ #include "cap-list.h" #include "cpu-set-util.h" #include "env-util.h" +#include "format-util.h" #include "fs-util.h" #include "hostname-util.h" #include "json.h" diff --git a/src/nspawn/nspawn-seccomp.c b/src/nspawn/nspawn-seccomp.c index e7ef80f7d6..9b5eb011ae 100644 --- a/src/nspawn/nspawn-seccomp.c +++ b/src/nspawn/nspawn-seccomp.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #if HAVE_SECCOMP diff --git a/src/nspawn/nspawn-settings.h b/src/nspawn/nspawn-settings.h index 231082706d..64910c3ecc 100644 --- a/src/nspawn/nspawn-settings.h +++ b/src/nspawn/nspawn-settings.h @@ -17,6 +17,7 @@ #include "missing_resource.h" #include "nspawn-expose-ports.h" #include "nspawn-mount.h" +#include "time-util.h" typedef enum StartMode { START_PID1, /* Run parameters as command line as process 1 */ diff --git a/src/nspawn/nspawn-setuid.c b/src/nspawn/nspawn-setuid.c index 0b26f1a042..3c302d6487 100644 --- a/src/nspawn/nspawn-setuid.c +++ b/src/nspawn/nspawn-setuid.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include #include #include diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c index a73ac939a7..da3efb960a 100644 --- a/src/nss-mymachines/nss-mymachines.c +++ b/src/nss-mymachines/nss-mymachines.c @@ -10,6 +10,7 @@ #include "bus-common-errors.h" #include "env-util.h" #include "errno-util.h" +#include "format-util.h" #include "hostname-util.h" #include "in-addr-util.h" #include "macro.h" diff --git a/src/nss-resolve/nss-resolve.c b/src/nss-resolve/nss-resolve.c index 12c9c4f7f3..0aa56c0882 100644 --- a/src/nss-resolve/nss-resolve.c +++ b/src/nss-resolve/nss-resolve.c @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include "sd-bus.h" diff --git a/src/nss-systemd/nss-systemd.c b/src/nss-systemd/nss-systemd.c index f8db27ae27..8beae06d87 100644 --- a/src/nss-systemd/nss-systemd.c +++ b/src/nss-systemd/nss-systemd.c @@ -10,6 +10,7 @@ #include "dirent-util.h" #include "env-util.h" #include "fd-util.h" +#include "format-util.h" #include "fs-util.h" #include "list.h" #include "macro.h" diff --git a/src/partition/growfs.c b/src/partition/growfs.c index c9d1c27792..60a310946d 100644 --- a/src/partition/growfs.c +++ b/src/partition/growfs.c @@ -25,6 +25,7 @@ #include "pretty-print.h" #include "stat-util.h" #include "strv.h" +#include "util.h" static const char *arg_target = NULL; static bool arg_dry_run = false; diff --git a/src/portable/portabled-image-bus.c b/src/portable/portabled-image-bus.c index 360559811f..2f19b48fe2 100644 --- a/src/portable/portabled-image-bus.c +++ b/src/portable/portabled-image-bus.c @@ -1,5 +1,10 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include +#include +#include + #include "alloc-util.h" #include "bus-common-errors.h" #include "bus-label.h" diff --git a/src/portable/portabled.c b/src/portable/portabled.c index 49a359fd31..5464360f89 100644 --- a/src/portable/portabled.c +++ b/src/portable/portabled.c @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include + #include "sd-bus.h" #include "sd-daemon.h" diff --git a/src/quotacheck/quotacheck.c b/src/quotacheck/quotacheck.c index 90f542a058..4e83fc83d5 100644 --- a/src/quotacheck/quotacheck.c +++ b/src/quotacheck/quotacheck.c @@ -4,6 +4,8 @@ #include #include #include +#include +#include #include #include "main-func.h" diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c index 4d533f851a..7b9e13f3f6 100644 --- a/src/resolve/resolvectl.c +++ b/src/resolve/resolvectl.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include #include #include "sd-bus.h" diff --git a/src/resolve/resolved-dns-answer.c b/src/resolve/resolved-dns-answer.c index 44dc6552b4..0ee7340ffc 100644 --- a/src/resolve/resolved-dns-answer.c +++ b/src/resolve/resolved-dns-answer.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include + #include "alloc-util.h" #include "dns-domain.h" #include "resolved-dns-answer.h" diff --git a/src/resolve/resolved-dns-rr.h b/src/resolve/resolved-dns-rr.h index 3d27836651..291447f00e 100644 --- a/src/resolve/resolved-dns-rr.h +++ b/src/resolve/resolved-dns-rr.h @@ -9,6 +9,7 @@ #include "in-addr-util.h" #include "list.h" #include "string-util.h" +#include "time-util.h" typedef struct DnsResourceKey DnsResourceKey; typedef struct DnsResourceRecord DnsResourceRecord; diff --git a/src/resolve/resolved-etc-hosts.c b/src/resolve/resolved-etc-hosts.c index ee21222e50..6a23d2bb8e 100644 --- a/src/resolve/resolved-etc-hosts.c +++ b/src/resolve/resolved-etc-hosts.c @@ -1,5 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include +#include + #include "fd-util.h" #include "fileio.h" #include "hostname-util.h" diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c index b3d35c8341..9b8239bd09 100644 --- a/src/resolve/resolved-manager.c +++ b/src/resolve/resolved-manager.c @@ -1,9 +1,13 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include #include #include #include +#include +#include +#include #if HAVE_LIBIDN2 #include diff --git a/src/resolve/resolved-resolv-conf.c b/src/resolve/resolved-resolv-conf.c index 5205071d3f..0435791ea0 100644 --- a/src/resolve/resolved-resolv-conf.c +++ b/src/resolve/resolved-resolv-conf.c @@ -2,6 +2,9 @@ #include #include +#include +#include +#include #include "alloc-util.h" #include "dns-domain.h" diff --git a/src/resolve/resolved.c b/src/resolve/resolved.c index 0845b2c1ae..2ca9fbdc72 100644 --- a/src/resolve/resolved.c +++ b/src/resolve/resolved.c @@ -1,5 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include +#include + #include "sd-daemon.h" #include "sd-event.h" diff --git a/src/rfkill/rfkill.c b/src/rfkill/rfkill.c index 8a92a4de6e..16610cd476 100644 --- a/src/rfkill/rfkill.c +++ b/src/rfkill/rfkill.c @@ -1,7 +1,11 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include #include +#include +#include +#include #include "sd-daemon.h" #include "sd-device.h" diff --git a/src/run-generator/run-generator.c b/src/run-generator/run-generator.c index a5dfac01d4..7d6c110912 100644 --- a/src/run-generator/run-generator.c +++ b/src/run-generator/run-generator.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include + #include "alloc-util.h" #include "escape.h" #include "fd-util.h" diff --git a/src/run/run.c b/src/run/run.c index 3f2221f610..0d05fab345 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -2,6 +2,9 @@ #include #include +#include +#include +#include #include "sd-bus.h" #include "sd-event.h" diff --git a/src/shared/acl-util.c b/src/shared/acl-util.c index 9633514513..1ccb4f8295 100644 --- a/src/shared/acl-util.c +++ b/src/shared/acl-util.c @@ -2,6 +2,8 @@ #include #include +#include +#include #include "acl-util.h" #include "alloc-util.h" diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c index af8da15236..e3e8c73464 100644 --- a/src/shared/bootspec.c +++ b/src/shared/bootspec.c @@ -2,6 +2,7 @@ #include #include +#include #include "sd-device.h" #include "sd-id128.h" @@ -27,6 +28,7 @@ #include "string-util.h" #include "strv.h" #include "unaligned.h" +#include "util.h" #include "virt.h" static void boot_entry_free(BootEntry *entry) { diff --git a/src/shared/bus-util.h b/src/shared/bus-util.h index 2e42c45740..59bfdb2398 100644 --- a/src/shared/bus-util.h +++ b/src/shared/bus-util.h @@ -12,6 +12,7 @@ #include "hashmap.h" #include "macro.h" #include "string-util.h" +#include "time-util.h" typedef enum BusTransport { BUS_TRANSPORT_LOCAL, diff --git a/src/shared/format-table.c b/src/shared/format-table.c index 4e8fc808cd..a5c0a99b08 100644 --- a/src/shared/format-table.c +++ b/src/shared/format-table.c @@ -17,6 +17,7 @@ #include "terminal-util.h" #include "time-util.h" #include "utf8.h" +#include "util.h" #define DEFAULT_WEIGHT 100 diff --git a/src/shared/json.c b/src/shared/json.c index 253957d298..10431423e9 100644 --- a/src/shared/json.c +++ b/src/shared/json.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include #include #include #include diff --git a/src/shared/json.h b/src/shared/json.h index 023f08d121..e5532c506e 100644 --- a/src/shared/json.h +++ b/src/shared/json.h @@ -4,10 +4,11 @@ #include #include #include +#include #include "macro.h" #include "string-util.h" -#include "util.h" +#include "log.h" /* In case you wonder why we have our own JSON implementation, here are a couple of reasons why this implementation has diff --git a/src/shared/pager.c b/src/shared/pager.c index bf2597e65a..2abb0f62d2 100644 --- a/src/shared/pager.c +++ b/src/shared/pager.c @@ -24,6 +24,7 @@ #include "string-util.h" #include "strv.h" #include "terminal-util.h" +#include "util.h" static pid_t pager_pid = 0; diff --git a/src/shared/serialize.h b/src/shared/serialize.h index 4cbd98bb34..8f4efc7996 100644 --- a/src/shared/serialize.h +++ b/src/shared/serialize.h @@ -5,6 +5,7 @@ #include "fdset.h" #include "macro.h" +#include "time-util.h" int serialize_item(FILE *f, const char *key, const char *value); int serialize_item_escaped(FILE *f, const char *key, const char *value); diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c index de28f00c65..7f23e54102 100644 --- a/src/shared/sleep-config.c +++ b/src/shared/sleep-config.c @@ -4,12 +4,15 @@ ***/ #include +#include #include #include #include #include #include #include +#include +#include #include #include diff --git a/src/shared/specifier.c b/src/shared/specifier.c index b8f7537f7a..c8e789680d 100644 --- a/src/shared/specifier.c +++ b/src/shared/specifier.c @@ -10,6 +10,7 @@ #include "sd-id128.h" #include "alloc-util.h" +#include "format-util.h" #include "fs-util.h" #include "hostname-util.h" #include "macro.h" diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c index 7af0195aab..0ed358bb32 100644 --- a/src/shutdown/umount.c +++ b/src/shutdown/umount.c @@ -9,6 +9,9 @@ #include #include #include +#include +#include +#include /* This needs to be after sys/mount.h :( */ #include diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index 71bc871121..11aabaf923 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -5,15 +5,20 @@ ***/ #include +#include #include #include #include +#include +#include +#include #include "sd-messages.h" #include "def.h" #include "exec-util.h" #include "fd-util.h" +#include "format-util.h" #include "fileio.h" #include "log.h" #include "main-func.h" diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index c67d790323..bb2643a480 100644 --- a/src/sysctl/sysctl.c +++ b/src/sysctl/sysctl.c @@ -7,6 +7,8 @@ #include #include #include +#include +#include #include "conf-files.h" #include "def.h" @@ -21,7 +23,6 @@ #include "string-util.h" #include "strv.h" #include "sysctl-util.h" -#include "util.h" static char **arg_prefixes = NULL; static bool arg_cat_config = false; diff --git a/src/systemctl/sysv-compat.c b/src/systemctl/sysv-compat.c index 72a2f57965..b56cfb4263 100644 --- a/src/systemctl/sysv-compat.c +++ b/src/systemctl/sysv-compat.c @@ -1,5 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include +#include + #include "fd-util.h" #include "initreq.h" #include "io-util.h" diff --git a/src/test/test-async.c b/src/test/test-async.c index 4f5307889e..7d8accc2fc 100644 --- a/src/test/test-async.c +++ b/src/test/test-async.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include #include "async.h" diff --git a/src/test/test-barrier.c b/src/test/test-barrier.c index 6469129fa4..10417f662f 100644 --- a/src/test/test-barrier.c +++ b/src/test/test-barrier.c @@ -18,6 +18,7 @@ #include "util.h" #include "tests.h" #include "virt.h" +#include "time-util.h" /* 20ms to test deadlocks; All timings use multiples of this constant as * alarm/sleep timers. If this timeout is too small for slow machines to perform diff --git a/src/test/test-boot-timestamps.c b/src/test/test-boot-timestamps.c index a79e0cf16b..79b8dd49a7 100644 --- a/src/test/test-boot-timestamps.c +++ b/src/test/test-boot-timestamps.c @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include + #include "acpi-fpdt.h" #include "boot-timestamps.h" #include "efivars.h" diff --git a/src/test/test-cap-list.c b/src/test/test-cap-list.c index de5fa729cc..563b996941 100644 --- a/src/test/test-cap-list.c +++ b/src/test/test-cap-list.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include #include "alloc-util.h" diff --git a/src/test/test-daemon.c b/src/test/test-daemon.c index a4b96da045..6ca821581f 100644 --- a/src/test/test-daemon.c +++ b/src/test/test-daemon.c @@ -6,6 +6,7 @@ #include "parse-util.h" #include "strv.h" +#include "time-util.h" int main(int argc, char *argv[]) { _cleanup_strv_free_ char **l = NULL; diff --git a/src/test/test-date.c b/src/test/test-date.c index cba51e225c..9888b65998 100644 --- a/src/test/test-date.c +++ b/src/test/test-date.c @@ -5,7 +5,7 @@ #include "alloc-util.h" #include "string-util.h" #include "tests.h" -#include "util.h" +#include "time-util.h" static void test_should_pass(const char *p) { usec_t t, q; diff --git a/src/test/test-fstab-util.c b/src/test/test-fstab-util.c index bd873a39be..4cd504e45c 100644 --- a/src/test/test-fstab-util.c +++ b/src/test/test-fstab-util.c @@ -1,10 +1,11 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include + #include "alloc-util.h" #include "fstab-util.h" #include "log.h" #include "string-util.h" -#include "util.h" /* int fstab_filter_options(const char *opts, const char *names, diff --git a/src/test/test-hashmap-plain.c b/src/test/test-hashmap-plain.c index 325c3b32cc..fdb0c7e87f 100644 --- a/src/test/test-hashmap-plain.c +++ b/src/test/test-hashmap-plain.c @@ -7,6 +7,7 @@ #include "stdio-util.h" #include "string-util.h" #include "strv.h" +#include "time-util.h" #include "tests.h" void test_hashmap_funcs(void); diff --git a/src/test/test-hostname-util.c b/src/test/test-hostname-util.c index 4126a24ceb..ec34f9cd71 100644 --- a/src/test/test-hostname-util.c +++ b/src/test/test-hostname-util.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include + #include "alloc-util.h" #include "fileio.h" #include "hostname-util.h" diff --git a/src/test/test-id128.c b/src/test/test-id128.c index ec50e057a3..8840788310 100644 --- a/src/test/test-id128.c +++ b/src/test/test-id128.c @@ -1,6 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include +#include +#include #include "sd-daemon.h" #include "sd-id128.h" diff --git a/src/test/test-install-root.c b/src/test/test-install-root.c index 73ea68f372..cfddfe19a7 100644 --- a/src/test/test-install-root.c +++ b/src/test/test-install-root.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include + #include "alloc-util.h" #include "fileio.h" #include "install.h" diff --git a/src/test/test-locale-util.c b/src/test/test-locale-util.c index f1d044082b..28d90be896 100644 --- a/src/test/test-locale-util.c +++ b/src/test/test-locale-util.c @@ -4,6 +4,7 @@ #include "locale-util.h" #include "macro.h" #include "strv.h" +#include "util.h" static void test_get_locales(void) { _cleanup_strv_free_ char **locales = NULL; diff --git a/src/test/test-mountpoint-util.c b/src/test/test-mountpoint-util.c index be76429506..8c5aac8eb7 100644 --- a/src/test/test-mountpoint-util.c +++ b/src/test/test-mountpoint-util.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include #include "alloc-util.h" #include "def.h" diff --git a/src/test/test-namespace.c b/src/test/test-namespace.c index cc2efecfd2..73ad2b25dd 100644 --- a/src/test/test-namespace.c +++ b/src/test/test-namespace.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include #include "alloc-util.h" #include "fd-util.h" diff --git a/src/test/test-netlink-manual.c b/src/test/test-netlink-manual.c index 1ebe8d1972..a1a5eb4778 100644 --- a/src/test/test-netlink-manual.c +++ b/src/test/test-netlink-manual.c @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include "sd-netlink.h" diff --git a/src/test/test-nss.c b/src/test/test-nss.c index f1bba2a353..27afe36082 100644 --- a/src/test/test-nss.c +++ b/src/test/test-nss.c @@ -3,6 +3,7 @@ #include #include #include +#include #include "af-list.h" #include "alloc-util.h" diff --git a/src/test/test-pretty-print.c b/src/test/test-pretty-print.c index 53ec512ec3..3ad80d145d 100644 --- a/src/test/test-pretty-print.c +++ b/src/test/test-pretty-print.c @@ -1,6 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include +#include +#include #include "alloc-util.h" #include "macro.h" diff --git a/src/test/test-replace-var.c b/src/test/test-replace-var.c index 55208b179f..8620e72b2b 100644 --- a/src/test/test-replace-var.c +++ b/src/test/test-replace-var.c @@ -1,11 +1,10 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -#include +#include #include "macro.h" #include "replace-var.h" #include "string-util.h" -#include "util.h" static char *lookup(const char *variable, void *userdata) { return strjoin("<<<", variable, ">>>"); diff --git a/src/test/test-rlimit-util.c b/src/test/test-rlimit-util.c index 771719a267..fac30126ce 100644 --- a/src/test/test-rlimit-util.c +++ b/src/test/test-rlimit-util.c @@ -8,7 +8,7 @@ #include "missing.h" #include "rlimit-util.h" #include "string-util.h" -#include "util.h" +#include "time-util.h" static void test_rlimit_parse_format(int resource, const char *string, rlim_t soft, rlim_t hard, int ret, const char *formatted) { _cleanup_free_ char *f = NULL; diff --git a/src/test/test-sleep.c b/src/test/test-sleep.c index 618da6e40d..e0c513ad8c 100644 --- a/src/test/test-sleep.c +++ b/src/test/test-sleep.c @@ -1,8 +1,11 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include #include #include +#include +#include #include "fd-util.h" #include "log.h" @@ -10,6 +13,7 @@ #include "sleep-config.h" #include "strv.h" #include "tests.h" +#include "util.h" static void test_parse_sleep_config(void) { const char *verb; diff --git a/src/test/test-socket-util.c b/src/test/test-socket-util.c index cd4e784894..057840d76f 100644 --- a/src/test/test-socket-util.c +++ b/src/test/test-socket-util.c @@ -1,8 +1,10 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include +#include #include #include -#include #include "alloc-util.h" #include "async.h" @@ -19,7 +21,6 @@ #include "string-util.h" #include "tests.h" #include "tmpfile-util.h" -#include "util.h" static void test_ifname_valid(void) { log_info("/* %s */", __func__); diff --git a/src/test/test-string-util.c b/src/test/test-string-util.c index 8c1f91d4ef..064a5abdac 100644 --- a/src/test/test-string-util.c +++ b/src/test/test-string-util.c @@ -7,6 +7,7 @@ #include "strv.h" #include "tests.h" #include "utf8.h" +#include "util.h" static void test_string_erase(void) { char *x; diff --git a/src/test/test-terminal-util.c b/src/test/test-terminal-util.c index e510b737c7..8cd580e719 100644 --- a/src/test/test-terminal-util.c +++ b/src/test/test-terminal-util.c @@ -1,7 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include #include #include +#include #include "alloc-util.h" #include "fd-util.h" diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c index 6b01529068..8a0251e13a 100644 --- a/src/test/test-unit-file.c +++ b/src/test/test-unit-file.c @@ -13,6 +13,7 @@ #include "conf-parser.h" #include "env-file.h" #include "fd-util.h" +#include "format-util.h" #include "fs-util.h" #include "hashmap.h" #include "hostname-util.h" diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c index 959d6d4614..fd2443e3cb 100644 --- a/src/test/test-unit-name.c +++ b/src/test/test-unit-name.c @@ -8,6 +8,7 @@ #include "alloc-util.h" #include "all-units.h" #include "glob-util.h" +#include "format-util.h" #include "hostname-util.h" #include "macro.h" #include "manager.h" diff --git a/src/test/test-user-util.c b/src/test/test-user-util.c index 801824ad67..1a507bc00a 100644 --- a/src/test/test-user-util.c +++ b/src/test/test-user-util.c @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include "alloc-util.h" +#include "format-util.h" #include "log.h" #include "macro.h" +#include "path-util.h" #include "string-util.h" #include "user-util.h" -#include "util.h" -#include "path-util.h" static void test_uid_to_name_one(uid_t uid, const char *name) { _cleanup_free_ char *t = NULL; diff --git a/src/test/test-verbs.c b/src/test/test-verbs.c index efb9664b3c..24593c75d9 100644 --- a/src/test/test-verbs.c +++ b/src/test/test-verbs.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include + #include "macro.h" #include "strv.h" #include "verbs.h" diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index b3f44bfaab..fe91854ac8 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -2,6 +2,8 @@ #include #include +#include +#include #include #include "sd-bus.h" diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c index 6fde4a316b..4c00fa409f 100644 --- a/src/timesync/timesyncd-manager.c +++ b/src/timesync/timesyncd-manager.c @@ -17,6 +17,7 @@ #include "alloc-util.h" #include "dns-domain.h" #include "fd-util.h" +#include "format-util.h" #include "fs-util.h" #include "list.h" #include "log.h" diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c index b4f70c0007..73d40c0948 100644 --- a/src/timesync/timesyncd.c +++ b/src/timesync/timesyncd.c @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include + #include "sd-daemon.h" #include "sd-event.h" diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index 2d3418dda1..790177d681 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -15,8 +15,10 @@ #include #include #include -#include +#include +#include #include +#include #include #include "alloc-util.h" diff --git a/src/udev/udevadm-monitor.c b/src/udev/udevadm-monitor.c index 07caaa3794..ca7ca3c37f 100644 --- a/src/udev/udevadm-monitor.c +++ b/src/udev/udevadm-monitor.c @@ -19,6 +19,7 @@ #include "string-util.h" #include "udevadm.h" #include "virt.h" +#include "time-util.h" static bool arg_show_property = false; static bool arg_print_kernel = false; diff --git a/src/update-done/update-done.c b/src/update-done/update-done.c index c76c2d1f51..bbd14165d5 100644 --- a/src/update-done/update-done.c +++ b/src/update-done/update-done.c @@ -1,9 +1,13 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#include +#include +#include + #include "alloc-util.h" #include "fileio-label.h" #include "selinux-util.h" -#include "util.h" +#include "time-util.h" #define MESSAGE \ "# This file was created by systemd-update-done. Its only \n" \ diff --git a/src/update-utmp/update-utmp.c b/src/update-utmp/update-utmp.c index 7d66ed3357..bfc78b9739 100644 --- a/src/update-utmp/update-utmp.c +++ b/src/update-utmp/update-utmp.c @@ -2,6 +2,8 @@ #include #include +#include +#include #include #if HAVE_AUDIT diff --git a/src/user-sessions/user-sessions.c b/src/user-sessions/user-sessions.c index 490d9f01a9..c241429517 100644 --- a/src/user-sessions/user-sessions.c +++ b/src/user-sessions/user-sessions.c @@ -1,6 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #include +#include +#include +#include #include #include "fileio.h" @@ -10,7 +13,6 @@ #include "log.h" #include "selinux-util.h" #include "string-util.h" -#include "util.h" static int run(int argc, char *argv[]) { int r, k; diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c index ebdeba3e8e..67dc2e49f9 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c @@ -15,6 +15,8 @@ #include #include #include +#include +#include #include #include "alloc-util.h"