From ca78ad1de987b800978622a22ac6c5caf628a037 Mon Sep 17 00:00:00 2001 From: =?utf8?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 | 24 +--------------------- 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 + src/hibernate-resume/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 + src/libsystemd/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, 291 insertions(+), 51 deletions(-) diff --git a/src/activate/activate.c b/src/activate/activate.c index 35ab08f..0b96344 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 a3b9a1d..87c5f0e 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 2fcc693..28a1a90 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 9fac676..32c53f8 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 f5cabc6..1d5c641 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 4bb65d5..6b82eab 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 375da92..f35e760 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 5aca17c..7824af3 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 392cab6..aa5f95a 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 412563f..25e6ab8 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 af31f09..66e2f01 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 0eb336c..8f3ebd3 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 7b00ee4..c380bee 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 214dd64..b9c0f28 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 fd7c5f6..17072b0 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 f613db8..2a2fb8b 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 60d7e1d..c8b1a85 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 bac1aa3..b8a94a5 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 89029b6..0951f7d 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 f748a82..02601e5 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 49b37ae..cd7fb01 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 d1e351c..4b8fbfb 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 73fd420..35885df 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 dab4c1a..ab1ac12 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 ea18e84..5ae1fca 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 1f0e34b..864d6ff 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 fa4ca57..1b5fb2a 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 01fe350..71bb99a 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 bc53964..0991b28 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 8b127ca..02eb0c9 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 058a71b..c35ef55 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 7db03b2..cd6822f 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 a03e844..6a7be64 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 4907106..4566a66 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 35ba6ba..974c0f5 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 f34244a..e3a1ae8 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 6881bd6..9f759a77 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 3376992..68b1221 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 bd2b458..1703cfd 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 651e70c..96ea942 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 af45fa5..734e8c7 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 21c0eaa..7beffc1 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 4e6f161..20497d1 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 e95ce2b..7a79e56 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 a5ee10c..da275c2 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 29e324d..c9036d3 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 5e19c71..c3a5df0 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 0b42d53..39e968b 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 a299280..9dab51f 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 3f6b42d..5f0b3dd 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 0920833..fac2b43 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 81dbc22..566674d 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 8a7c5bc..b30be7e 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 0c04fea..28f801c 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 f485813..a16314a 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 59359ae..c8e3449 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 c4c1c81..7dc44e5 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 caf94d1..c8ee1ec 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 c4d4016..4ec0616 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 c73860f..831c257 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 2dd3d41..8de0a85 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 8f27644..4da6e65 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 e459b13..33a25d5 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 dd9bf9e..2ac4b59 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 77531d9..79fe1a8 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 1789e54..e9df5f8 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 a8af3fc..4a366d4 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 1711426..37505ea 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 67f3361..76d8a4e 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 f851d35..8d0eec9 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 5f82b21..3ea1823 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 415c26b..1bee58d 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 a6d88f8..b4904c3 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 90a9108..a792423 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 7b774f4..7b6f73c 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 864b358..372ba44 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 eb66e18..c8a5625 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 4f89ac0..84454dd 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 31527d0..9ff9a65 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 0b92b1c..a3bed03 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 6256920..b290095 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 86f6435..3881aaa 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 53d1cfb..9075b0a 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 762f42d..0b614bf 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 fcecafe..4b04aa0 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 eb81e10..e559dd1 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 a5eddf3..fd7a48d 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 4a16f56..168125d 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 42153c5..5a1bce4 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 6c35c92..db8e4d3 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 e7ef80f..9b5eb01 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 2310827..64910c3 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 0b26f1a..3c302d6 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 a73ac93..da3efb9 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 12c9c4f..0aa56c0 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 f8db27a..8beae06 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 c9d1c27..60a3109 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 3605598..2f19b48 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 49a359f..5464360 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 90f542a..4e83fc8 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 4d533f8..7b9e13f 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 44dc655..0ee7340 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 3d27836..291447f 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 ee21222..6a23d2b 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 b3d35c8..9b8239b 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 5205071..0435791 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 0845b2c..2ca9fbd 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 8a92a4d..16610cd 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 a5dfac0..7d6c110 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 3f2221f..0d05fab 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 9633514..1ccb4f8 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 af8da15..e3e8c73 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 2e42c45..59bfdb2 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 4e8fc80..a5c0a99 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 253957d..1043142 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 023f08d..e5532c5 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 bf2597e..2abb0f6 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 4cbd98b..8f4efc7 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 de28f00..7f23e54 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 b8f7537..c8e7896 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 7af0195..0ed358b 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 71bc871..11aabaf 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 c67d790..bb2643a 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 72a2f57..b56cfb4 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 4f53078..7d8accc 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 6469129..10417f6 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 a79e0cf..79b8dd4 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 de5fa72..563b996 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 a4b96da..6ca8215 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 cba51e2..9888b65 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 bd873a3..4cd504e 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 325c3b3..fdb0c7e 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 4126a24..ec34f9c 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 ec50e05..8840788 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 73ea68f..cfddfe1 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 f1d0440..28d90be 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 be76429..8c5aac8 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 cc2efec..73ad2b2 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 1ebe8d1..a1a5eb4 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 f1bba2a..27afe36 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 53ec512..3ad80d1 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 55208b1..8620e72 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 771719a..fac3012 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 618da6e..e0c513a 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 cd4e784..057840d 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 8c1f91d..064a5ab 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 e510b73..8cd580e 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 6b01529..8a0251e 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 959d6d4..fd2443e 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 801824a..1a507bc 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 efb9664..24593c7 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 b3f44bf..fe91854 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 6fde4a3..4c00fa4 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 b4f70c0..73d40c0 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 2d3418d..790177d 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 07caaa3..ca7ca3c 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 c76c2d1..bbd1416 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 7d66ed3..bfc78b9 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 490d9f0..c241429 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 ebdeba3..67dc2e4 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" -- 2.7.4