]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
headers: remove unneeded includes from util.h
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 27 Mar 2019 10:32:41 +0000 (11:32 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 27 Mar 2019 10:53:12 +0000 (11:53 +0100)
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.

160 files changed:
src/activate/activate.c
src/analyze/analyze.c
src/backlight/backlight.c
src/basic/glob-util.c
src/basic/in-addr-util.c
src/basic/mkdir.c
src/basic/selinux-util.c
src/basic/stat-util.h
src/basic/strv.h
src/basic/util.h
src/binfmt/binfmt.c
src/core/dbus-service.c
src/core/dynamic-user.c
src/core/execute.h
src/core/ima-setup.c
src/core/loopback-setup.c
src/core/selinux-access.c
src/core/selinux-setup.c
src/core/service.c
src/core/show-status.c
src/core/smack-setup.c
src/core/timer.c
src/coredump/coredump-vacuum.c
src/coredump/stacktrace.c
src/cryptsetup/cryptsetup-generator.c
src/cryptsetup/cryptsetup.c
src/debug-generator/debug-generator.c
src/fuzz/fuzz-dhcp-server.c
src/fuzz/fuzz-journald-stream.c
src/hibernate-resume/hibernate-resume-generator.c
src/hostname/hostnamed.c
src/import/curl-util.c
src/import/curl-util.h
src/import/export.c
src/import/import-fs.c
src/import/import.c
src/import/pull-job.c
src/import/pull.c
src/import/test-qcow2.c
src/initctl/initctl.c
src/journal-remote/journal-gatewayd.c
src/journal/catalog.c
src/journal/catalog.h
src/journal/compress.c
src/journal/journal-authenticate.c
src/journal/journal-file.h
src/journal/journald-context.h
src/journal/journald-rate-limit.c
src/journal/journald-rate-limit.h
src/journal/journald-server.h
src/journal/test-compress.c
src/journal/test-journal-flush.c
src/libsystemd-network/dhcp-server-internal.h
src/libsystemd-network/ndisc-internal.h
src/libsystemd-network/sd-dhcp-lease.c
src/libsystemd-network/sd-ipv4acd.c
src/libsystemd-network/test-ndisc-ra.c
src/libsystemd-network/test-ndisc-rs.c
src/libsystemd/sd-bus/bus-convenience.c
src/libsystemd/sd-bus/bus-internal.h
src/libsystemd/sd-bus/test-bus-benchmark.c
src/libsystemd/sd-device/device-enumerator.c
src/libsystemd/sd-device/test-sd-device.c
src/libsystemd/sd-hwdb/hwdb-util.c
src/libsystemd/sd-hwdb/sd-hwdb.c
src/libsystemd/sd-login/test-login.c
src/libsystemd/sd-netlink/netlink-internal.h
src/libsystemd/sd-netlink/test-local-addresses.c
src/locale/keymap-util.c
src/locale/localed.c
src/login/logind-dbus.c
src/login/logind-inhibit.c
src/login/logind-seat.c
src/login/logind-session.c
src/login/logind.h
src/login/pam_systemd.c
src/login/user-runtime-dir.c
src/machine/machine.c
src/machine/machine.h
src/machine/machined.c
src/mount/mount-tool.c
src/network/networkctl.c
src/network/networkd-manager.c
src/network/networkd-ndisc.h
src/network/networkd.c
src/network/wait-online/manager.h
src/network/wait-online/wait-online.c
src/nspawn/nspawn-cgroup.c
src/nspawn/nspawn-mount.c
src/nspawn/nspawn-oci.c
src/nspawn/nspawn-seccomp.c
src/nspawn/nspawn-settings.h
src/nspawn/nspawn-setuid.c
src/nss-mymachines/nss-mymachines.c
src/nss-resolve/nss-resolve.c
src/nss-systemd/nss-systemd.c
src/partition/growfs.c
src/portable/portabled-image-bus.c
src/portable/portabled.c
src/quotacheck/quotacheck.c
src/resolve/resolvectl.c
src/resolve/resolved-dns-answer.c
src/resolve/resolved-dns-rr.h
src/resolve/resolved-etc-hosts.c
src/resolve/resolved-manager.c
src/resolve/resolved-resolv-conf.c
src/resolve/resolved.c
src/rfkill/rfkill.c
src/run-generator/run-generator.c
src/run/run.c
src/shared/acl-util.c
src/shared/bootspec.c
src/shared/bus-util.h
src/shared/format-table.c
src/shared/json.c
src/shared/json.h
src/shared/pager.c
src/shared/serialize.h
src/shared/sleep-config.c
src/shared/specifier.c
src/shutdown/umount.c
src/sleep/sleep.c
src/sysctl/sysctl.c
src/systemctl/sysv-compat.c
src/test/test-async.c
src/test/test-barrier.c
src/test/test-boot-timestamps.c
src/test/test-cap-list.c
src/test/test-daemon.c
src/test/test-date.c
src/test/test-fstab-util.c
src/test/test-hashmap-plain.c
src/test/test-hostname-util.c
src/test/test-id128.c
src/test/test-install-root.c
src/test/test-locale-util.c
src/test/test-mountpoint-util.c
src/test/test-namespace.c
src/test/test-netlink-manual.c
src/test/test-nss.c
src/test/test-pretty-print.c
src/test/test-replace-var.c
src/test/test-rlimit-util.c
src/test/test-sleep.c
src/test/test-socket-util.c
src/test/test-string-util.c
src/test/test-terminal-util.c
src/test/test-unit-file.c
src/test/test-unit-name.c
src/test/test-user-util.c
src/test/test-verbs.c
src/timedate/timedated.c
src/timesync/timesyncd-manager.c
src/timesync/timesyncd.c
src/tty-ask-password-agent/tty-ask-password-agent.c
src/udev/udevadm-monitor.c
src/update-done/update-done.c
src/update-utmp/update-utmp.c
src/user-sessions/user-sessions.c
src/vconsole/vconsole-setup.c

index 35ab08f22d85f2fd660d1d99391b1de232bacaee..0b963440381bbbb827425085c7d1b296c28ef73b 100644 (file)
@@ -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;
index a3b9a1de3afc239613de9d044503f90d40ed5e38..87c5f0e43c8c028d9dd6427c6241d72e693b8fab 100644 (file)
@@ -8,6 +8,7 @@
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 #include "sd-bus.h"
 
index 2fcc693c48f6ad585eb2c0c9d4005542e9f2767a..28a1a903d128fea13995381d135126de12439798 100644 (file)
@@ -1,5 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #include "sd-device.h"
 
 #include "alloc-util.h"
index 9fac676f2b5d6671e206543e19a1e17697bd0b04..32c53f8c736f05920683f5d42ab860d6f072dd56 100644 (file)
@@ -4,6 +4,8 @@
 #include <errno.h>
 #include <glob.h>
 #include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 
 #include "dirent-util.h"
 #include "glob-util.h"
index f5cabc65346c97c40346226205fffaa23f9bcfc0..1d5c6412b5ba50bcd587a3e2dba92acb6b84abb9 100644 (file)
@@ -5,6 +5,7 @@
 #include <errno.h>
 #include <net/if.h>
 #include <stdint.h>
+#include <stdio.h>
 #include <stdlib.h>
 
 #include "alloc-util.h"
index 4bb65d5838dc8fb48b91e75677c854fa3113fa13..6b82eab640978965a859ec2fbe916e41c32eab0d 100644 (file)
@@ -6,6 +6,7 @@
 #include <sys/stat.h>
 
 #include "alloc-util.h"
+#include "format-util.h"
 #include "fs-util.h"
 #include "macro.h"
 #include "mkdir.h"
index 375da920f7a21cdfe61791a015b505ff08c19d06..f35e760233be51f4bc872aa2f03483cdc8b7415d 100644 (file)
@@ -1,11 +1,13 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <errno.h>
+#include <fcntl.h>
 #include <malloc.h>
 #include <stddef.h>
 #include <string.h>
 #include <sys/stat.h>
 #include <sys/time.h>
+#include <sys/types.h>
 #include <sys/un.h>
 #include <syslog.h>
 
index 5aca17c04a33067e04ee12aaf54009a3b9050d6e..7824af35006e5ed03b7a8296f6dd524f223532ce 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 #pragma once
 
+#include <fcntl.h>
 #include <stdbool.h>
 #include <stddef.h>
 #include <sys/stat.h>
index 392cab65be24c9f02234085384e20fb5b469a610..aa5f95ab72e7edaf35c3fef2a16581806f67351e 100644 (file)
@@ -5,12 +5,12 @@
 #include <stdarg.h>
 #include <stdbool.h>
 #include <stddef.h>
+#include <stdio.h>
 
 #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_;
index 412563fa8e7576318e8cc71b9edaeb4ba55e5a81..25e6ab81127d1049fac5d451ee9f658cfa285d01 100644 (file)
@@ -1,31 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 #pragma once
 
-#include <alloca.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <limits.h>
-#include <locale.h>
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stddef.h>
 #include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/inotify.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/sysmacros.h>
-#include <sys/types.h>
-#include <time.h>
-#include <unistd.h>
-
-#include "format-util.h"
+
 #include "macro.h"
-#include "time-util.h"
 
 static inline const char* yes_no(bool b) {
         return b ? "yes" : "no";
index af31f0967e5970874d56d1fa335f043a705e6268..66e2f0131c7e0b55e0295234451303633f2f9b10 100644 (file)
@@ -7,6 +7,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 #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;
index 0eb336cf03d1563cb5662fd4ad9ca81478bec838..8f3ebd3f6a64a5e2d1af9940c01b985ee34418c0 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <stdio_ext.h>
+#include <fcntl.h>
 
 #include "alloc-util.h"
 #include "async.h"
index 7b00ee4bda0bd7bed5641807601310ed91e89ee8..c380bee9e5c53bbf4ff60d5904ace84d3dd38288 100644 (file)
@@ -3,11 +3,14 @@
 #include <grp.h>
 #include <pwd.h>
 #include <sys/file.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 #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"
index 214dd64bbd2fc50a11977db2b65584d852962870..b9c0f28f99ef16a7cf7f53c807edd7dadbc4a3d8 100644 (file)
@@ -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)
 
index fd7c5f64af1061112ca0415cc1b39103e9c759ee..17072b09af342ceb017f12453ce6e46c1a9c1a16 100644 (file)
@@ -5,6 +5,9 @@
 ***/
 
 #include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #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"
index f613db83ce3f8504681d322b716410df96474eb9..2a2fb8b59cea48b8521b080337b981620986c3e5 100644 (file)
@@ -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)
 
index 60d7e1d89859471235a0de2a2ccd88bface40f10..c8b1a8588b1c999187cbbee22252f47eeb20e87f 100644 (file)
@@ -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"
index bac1aa3ff6ea7d3e0419ad761cf0d1356ddc51ce..b8a94a52ab6d21ca2bd844f83277c63eba297714 100644 (file)
@@ -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
index 89029b6d115eaa72c0c43ae04fbf19264b49800c..0951f7df4eee7738b56fd29d38131cb0d57c99c9 100644 (file)
@@ -2,6 +2,8 @@
 
 #include <errno.h>
 #include <signal.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "sd-messages.h"
index f748a8208469064fa3b3ca511d01213056a38405..02601e52db9bf2718fa64a711216193a98a2245a 100644 (file)
@@ -1,5 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
 #include "alloc-util.h"
 #include "fd-util.h"
 #include "io-util.h"
index 49b37aefc723aa128540b6ad8d70cb87bf1e898a..cd7fb01416484e9f09bb2224a8f94f271b5adbfd 100644 (file)
@@ -12,6 +12,7 @@
 #include <stdio_ext.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 #include "alloc-util.h"
 #include "dirent-util.h"
index d1e351c30dc26f59bb6a13d6a00a30755f320e3b..4b8fbfb5cdb8b4c697c1e0f6b14b9a41619dd2f3 100644 (file)
@@ -1,5 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #include <errno.h>
 
 #include "alloc-util.h"
index 73fd420f3d6cd90297cf5fab8121e2a869c203d1..35885dfb47c4dfa2b35476c37b41045f858c6a0d 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <sys/statvfs.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #include "alloc-util.h"
 #include "coredump-vacuum.h"
index dab4c1ad9b0607ccb42b81ea0c916bccbe0d4183..ab1ac12a23a57c30245b25256193df552f0351d5 100644 (file)
@@ -3,6 +3,8 @@
 #include <dwarf.h>
 #include <elfutils/libdwfl.h>
 #include <stdio_ext.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #include "alloc-util.h"
 #include "fd-util.h"
index ea18e84f31a56015ee16116691b4238925e13aad..5ae1fca2aff0797790f72c8cd054a09d99ea0fd1 100644 (file)
@@ -1,7 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <errno.h>
+#include <fcntl.h>
 #include <stdio_ext.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 #include "alloc-util.h"
 #include "dropin.h"
index 1f0e34b0389571588eaec6dedd43cb4c2d1446d7..864d6ff4725ca9f931538306264dd01b159dcbf8 100644 (file)
@@ -4,6 +4,9 @@
 #include <mntent.h>
 #include <string.h>
 #include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #include "sd-device.h"
 
index fa4ca57bbf3aa46a8788b8ebdc8992392fb70cd3..1b5fb2a28dfc18e8e72389f773a77680d66ec175 100644 (file)
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <unistd.h>
+
 #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;
index 01fe350ca5374420e63c9540338c78e0fecd37ee..71bb99a381cc9e608eb829637b799af188bea2ca 100644 (file)
@@ -1,5 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
 #include "fuzz.h"
 
 #include "sd-dhcp-server.c"
index bc539641392d345cd9c7fb429021179f29543d9c..0991b287c944e6c1b89d4d2f5a6bfbc93d1d855e 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <linux/sockios.h>
 #include <sys/ioctl.h>
+#include <unistd.h>
 
 #include "fd-util.h"
 #include "fuzz.h"
index 8b127ca85cbe18430f4cdd14644518fff90f0f97..02eb0c9a519266d4394b8265665896c064d37d63 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <errno.h>
 #include <stdio.h>
+#include <unistd.h>
 
 #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;
index 058a71b109deb82afe4223f1842f14975b6a3b80..c35ef556624071b8d7aadd3990ff49ca93dff9e2 100644 (file)
@@ -3,6 +3,8 @@
 #include <errno.h>
 #include <string.h>
 #include <sys/utsname.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
index 7db03b291916524cd30ec9456cf154f18e54b2ca..cd6822f8db61a01d59f230b470bb2150758bf82c 100644 (file)
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
+
 #include "alloc-util.h"
 #include "build.h"
 #include "curl-util.h"
index a03e8440305082511807854ce1ef27ddf34c2e8a..6a7be6421cb8abbfed325afcd6f978b666cbf7d0 100644 (file)
@@ -7,6 +7,7 @@
 #include "sd-event.h"
 
 #include "hashmap.h"
+#include "time-util.h"
 
 typedef struct CurlGlue CurlGlue;
 
index 490710678f7a54fd75e28a37034e4adf293ca801..4566a66a15453e2003cb225be63a4bff023991ca 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <getopt.h>
+#include <locale.h>
 
 #include "sd-event.h"
 #include "sd-id128.h"
index 35ba6ba382cea98f36eb048dfc6ece50a2e6db61..974c0f5536b5f0e2ca0c5c51b35b000ad1731289 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <getopt.h>
+#include <locale.h>
 
 #include "alloc-util.h"
 #include "btrfs-util.h"
index f34244acff2e71f81879cecf1f457204d7a49bb0..e3a1ae8a8bc92d14b124e8dab3e05e01eec46257 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <getopt.h>
+#include <locale.h>
 
 #include "sd-event.h"
 #include "sd-id128.h"
index 6881bd627f30453af52357621ddb07fefced6c7b..9f759a77e096c92de62ca8531dbe5e59b3add12c 100644 (file)
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
+#include <sys/stat.h>
 #include <sys/xattr.h>
 
 #include "alloc-util.h"
index 33769925888c7170c3087fb084bff5a171912b35..68b1221b724b5c3bc0d6de8c4b38a2b3b772a6c0 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <getopt.h>
+#include <locale.h>
 
 #include "sd-event.h"
 #include "sd-id128.h"
index bd2b45821989489dee4821ae6415d1eb971e5b0a..1703cfd16752ecbaade6a8d54d632c7edd6098e2 100644 (file)
@@ -1,9 +1,12 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
 #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;
index 651e70c7fa1fb55156b682b0f0fe40cd71e0a3ae..96ea942b52bde427fed88e2ecfb03ee2dea8c084 100644 (file)
@@ -4,6 +4,8 @@
 #include <errno.h>
 #include <stdio.h>
 #include <sys/epoll.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "sd-bus.h"
index af45fa549abba8852b2483bb229d5f0fd4cc97dc..734e8c7f3334e80b5a466cf21ae4fdcc8460a455 100644 (file)
@@ -5,6 +5,8 @@
 #include <microhttpd.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "sd-bus.h"
index 21c0eaac9fb34182dc1da5722334949b064180dd..7beffc1e1a30d22b5756f997affaf7284556ac5a 100644 (file)
@@ -6,6 +6,8 @@
 #include <stdio.h>
 #include <string.h>
 #include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "sd-id128.h"
index 4e6f161af3b6ad43519967bbbf68282b0b6848a8..20497d118ff3d17704b925b631be9eb3451f3969 100644 (file)
@@ -2,6 +2,7 @@
 #pragma once
 
 #include <stdbool.h>
+#include <stdio.h>
 
 #include "sd-id128.h"
 
index e95ce2bcaad08ca2abfba7bbb860b63255922e86..7a79e566b8faa5cbd002cb30937fc24716847784 100644 (file)
@@ -4,6 +4,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/stat.h>
 #include <unistd.h>
 
 #if HAVE_XZ
index a5ee10c3bc4a5741d48bd007a8c2d9b5cfedcb89..da275c2512f6abc415caed1147b22969d16755b2 100644 (file)
@@ -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;
index 29e324d8cfbb6d1a2116a592f89f7997af66678f..c9036d3e02eefce3a8cb05223e8396d22d763343 100644 (file)
@@ -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" */
index 5e19c71f14f59bbfb176112b7096b616da943b51..c3a5df0d98a19b53e3290ca56c215f1204cff509 100644 (file)
@@ -6,6 +6,8 @@
 
 #include "sd-id128.h"
 
+#include "time-util.h"
+
 typedef struct ClientContext ClientContext;
 
 #include "journald-server.h"
index 0b42d53760ace28734f15e9a0b658ea0f38563be..39e968bce3a15e87bf87af420821b6f8b607b9a6 100644 (file)
@@ -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
index a2992800fe544e6258ce9819663592347332b4ce..9dab51f7ccfd83fe9309da36098503dfb70b9349 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 #pragma once
 
-#include "util.h"
+#include "time-util.h"
 
 typedef struct JournalRateLimit JournalRateLimit;
 
index 3f6b42ddd5089910afab213a141dc1b712fda2a1..5f0b3dd4ac2a8a98c745dab65ea3fc374841a441 100644 (file)
@@ -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,
index 0920833c12c2b69da5e023c8f055a78116a045c8..fac2b43c4731ab45d105642efc27ec5b79bc7193 100644 (file)
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <sys/stat.h>
+
 #if HAVE_LZ4
 #include <lz4.h>
 #endif
index 81dbc22a70ed0eb775cfa38bc69657d6fda2e6ca..566674d6b0698670195ed0c2bf2c87e4904250c1 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <fcntl.h>
+#include <unistd.h>
 
 #include "sd-journal.h"
 
index 8a7c5bc28f2a37a6d8131809fdf983a5a47a5ccf..b30be7e5b2d6e4b0173a2b2d6417ef60b18875d4 100644 (file)
@@ -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;
index 0c04fea8e5df370d343fcc6cb36517e7e432e39b..28f801cd7fb3d1bafabfd9ebb4e1b262b97d65b2 100644 (file)
@@ -6,6 +6,7 @@
 ***/
 
 #include "log.h"
+#include "time-util.h"
 
 #include "sd-ndisc.h"
 
index f48581308ca97ec14e87ed6ed04a6e93a5d9b802..a16314a9d37988005536fdae71680c931f43beca 100644 (file)
@@ -9,6 +9,9 @@
 #include <stdio_ext.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #include "sd-dhcp-lease.h"
 
index 59359aec79a407a0d86ad42c36bbfd3f754bc09b..c8e34497fd04f463b3da2d6a1da8a43046a77136 100644 (file)
@@ -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)
index c4c1c811407d5269b56f2b180d7c2c1d9e7ddb45..7dc44e56740d5501c664dda2247f16d4db38c8a1 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <netinet/icmp6.h>
 #include <arpa/inet.h>
+#include <unistd.h>
 
 #include "sd-radv.h"
 
index caf94d10f8799f0019ec93118ed7ba1e4d3e3ae9..c8ee1ec31d24b7436b640dadb61aa59578082270 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <netinet/icmp6.h>
 #include <arpa/inet.h>
+#include <unistd.h>
 
 #include "sd-ndisc.h"
 
index c4d4016fc03004634d2bf35857b0e5b6a353fc20..4ec061644d53b42cb15cfd08c46da33c72c710a9 100644 (file)
@@ -1,5 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <unistd.h>
+#include <sys/types.h>
+
 #include "bus-internal.h"
 #include "bus-message.h"
 #include "bus-signature.h"
index c73860fb65ee9debc8966a0dcb131b80e53846b1..831c257978bb86f45fb1d17020b2ef364d8ca9ab 100644 (file)
@@ -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 */
index 2dd3d41a302a290b6c9409e26ce1292909d3ac2d..8de0a859ee9400c26594bd0686c81ce5f3a2137f 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <sys/wait.h>
+#include <unistd.h>
 
 #include "sd-bus.h"
 
index 8f2764490a5697801e2cee4022c320a7a23728cd..4da6e652106866825d67e5bfd68c0bb831652415 100644 (file)
@@ -1,5 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
+#include <unistd.h>
+
 #include "sd-device.h"
 
 #include "alloc-util.h"
index e459b13b9625a17181d3d4e762f7eb8a67b3ceaa..33a25d576a8e1e163c00152186fd0c0da93873a8 100644 (file)
@@ -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;
index dd9bf9e18d6a3b0f30313689a24864f194757e04..2ac4b59ad74ca71acbc2b27a961fca316fafbc8e 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <ctype.h>
 #include <stdio.h>
+#include <sys/stat.h>
 
 #include "alloc-util.h"
 #include "conf-files.h"
index 77531d9505cc85da9b40247f2d7f17c42ee7de57..79fe1a83a715d0690688b4de2d9108225cc98c7f 100644 (file)
@@ -10,6 +10,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/mman.h>
+#include <sys/stat.h>
 
 #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;
index 1789e547b869117a74e67cb197d04ae3eeaf5784..e9df5f8bc59023b98e852d69e0ab6bf137600a73 100644 (file)
@@ -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) {
index a8af3fc63b5289d0e97d00fb795b3680b866f0c7..4a366d421f3ea776a539df3d1792095b7a6884ac 100644 (file)
@@ -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))
 
index 17114265d7be965f86cb2126553cd183e1b809d3..37505ea7837828e1f610afdf477fca17d516f7f9 100644 (file)
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <stdio.h>
+
 #include "af-list.h"
 #include "alloc-util.h"
 #include "in-addr-util.h"
index 67f33612deee1549343d68bd50cc3df7d7b6ece3..76d8a4e0413c23df0d21a3da66930139775dda3e 100644 (file)
@@ -3,6 +3,8 @@
 #include <errno.h>
 #include <stdio_ext.h>
 #include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "bus-util.h"
index f851d35a08e412868cc447d0a7812975538bb0aa..8d0eec96a53b6b7966139bb3bf3c82e0d639ea2f 100644 (file)
@@ -2,6 +2,8 @@
 
 #include <errno.h>
 #include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #if HAVE_XKBCOMMON
index 5f82b21995627ecd514aca5eb3a59e1118d14648..3ea182323831fe7d27409d80c878702973e050cd 100644 (file)
@@ -3,6 +3,7 @@
 #include <errno.h>
 #include <pwd.h>
 #include <string.h>
+#include <sys/stat.h>
 #include <unistd.h>
 
 #include "sd-device.h"
index 415c26b147de6cfa3c7504a4d674684a332bc6dd..1bee58db121cd7c6c1582379d11309b57a742ae2 100644 (file)
@@ -3,6 +3,8 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
index a6d88f8e7b83c4d98aba4e7c871e4615ecf680bf..b4904c37d5d8b9baf35acc09d4edccf99e99083c 100644 (file)
@@ -4,6 +4,7 @@
 #include <fcntl.h>
 #include <stdio_ext.h>
 #include <string.h>
+#include <sys/stat.h>
 #include <unistd.h>
 
 #include "sd-messages.h"
index 90a9108566637c39e8eb1ae0349de6793ece171e..a7924235b458a6bbbc2e6783c3e3ffb33cf8a245 100644 (file)
@@ -8,6 +8,7 @@
 #include <stdio_ext.h>
 #include <string.h>
 #include <sys/ioctl.h>
+#include <sys/stat.h>
 #include <unistd.h>
 
 #include "sd-messages.h"
index 7b774f49e09b96a15dd175eb3200712027ad5ed6..7b6f73c6ec63510091b48e49af5651077ad83cfc 100644 (file)
@@ -11,6 +11,7 @@
 #include "hashmap.h"
 #include "list.h"
 #include "set.h"
+#include "time-util.h"
 
 typedef struct Manager Manager;
 
index 864b358eb98513f303ee0ea6b13a763892b25db4..372ba44874fb12360411a448d241eaab42803037 100644 (file)
@@ -10,6 +10,9 @@
 #include <security/pam_modules.h>
 #include <security/pam_modutil.h>
 #include <sys/file.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #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,
index eb66e18de1c0c3bd685333fd4296d95b2d14c4cd..c8a56256057454036f5c510e8008387480441f9b 100644 (file)
@@ -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"
index 4f89ac026dbb5bc5406a4cafb1fac0d881328cd5..84454ddd864568703f15ebe0be99d59f08054f41 100644 (file)
@@ -4,6 +4,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <stdio_ext.h>
+#include <sys/stat.h>
 
 #include "sd-messages.h"
 
index 31527d029b27acf8757a7dd1c1106b7db0011780..9ff9a656717a94b2f1269c676365f571a52e5083 100644 (file)
@@ -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 */
index 0b92b1c6ee238bd822587aeef8ba8519cdc4c72a..a3bed035dc80c95169491506e078f1514f9f9c62 100644 (file)
@@ -2,6 +2,8 @@
 
 #include <errno.h>
 #include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "sd-daemon.h"
index 6256920e997db9549a2182699e5af882319f279f..b290095b0e95385c7acc15cf570f9bab45f9c46f 100644 (file)
@@ -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"
index 86f6435e4f598dd1f884d8c743eeb73d5ab19be8..3881aaa42b577b43c4d484f448445fb7cce9ff50 100644 (file)
@@ -4,6 +4,9 @@
 #include <linux/if_addrlabel.h>
 #include <net/if.h>
 #include <stdbool.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #include "sd-device.h"
 #include "sd-hwdb.h"
index 53d1cfb446e10b1a6a913a12f53359e34b0d589e..9075b0a14bd400546e76c10a3538510e1008a6d5 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/if.h>
 #include <linux/fib_rules.h>
 #include <stdio_ext.h>
+#include <unistd.h>
 
 #include "sd-daemon.h"
 #include "sd-netlink.h"
index 762f42d43e2024ed4e614770cb140cae53e127db..0b614bf50ffcc35c1186004a96223129f4726b4b 100644 (file)
@@ -2,6 +2,7 @@
 #pragma once
 
 #include "networkd-link.h"
+#include "time-util.h"
 
 typedef struct NDiscRDNSS {
         usec_t valid_until;
index fcecafe08396ff53eba49be02ead21c4577db0ff..4b04aa0463c91c862470ad2411d1db433e50e088 100644 (file)
@@ -1,5 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <sys/stat.h>
+#include <sys/types.h>
+
 #include "sd-daemon.h"
 #include "sd-event.h"
 
index eb81e106e11669a6bb00937abd16ac41a3b0ba39..e559dd168de4529bc8d4cd8f054d49f7b7af3f43 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "hashmap.h"
 #include "network-util.h"
+#include "time-util.h"
 
 typedef struct Manager Manager;
 typedef struct Link Link;
index a5eddf3ca2689debbbb66ef005b1b3ccf9057d80..fd7a48d81dc7e37ada56a233e47d3ac3641fa1d0 100644 (file)
@@ -1,6 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <getopt.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 #include "sd-daemon.h"
 
index 4a16f56d1ce48ca99a9a2ffff76c9413c9952e42..168125d3113f50670169a837f8bd57529b2dba40 100644 (file)
@@ -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"
index 42153c5a116d5ae5a76e843872715ea3deeccdb8..5a1bce4abc400fc273b82bb014a034fcb947e7d1 100644 (file)
@@ -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"
index 6c35c926ab102e6a200274a105da9b5b3e8fc2d8..db8e4d3b78ad73fcc3bde9eac93e9f6ad05e800c 100644 (file)
@@ -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"
index e7ef80f7d6715a7b456f7aad22ddf7431f1082ff..9b5eb011ae77760e4d9c47dfe74c9abce7c176d5 100644 (file)
@@ -3,6 +3,7 @@
 #include <errno.h>
 #include <linux/netlink.h>
 #include <sys/capability.h>
+#include <sys/socket.h>
 #include <sys/types.h>
 
 #if HAVE_SECCOMP
index 231082706d4199c206e0f33edc05f48e831acd15..64910c3ecc843a6fe07088792939447c67cd5055 100644 (file)
@@ -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 */
index 0b26f1a04277fea3b5d430e7cb7a819c551fb883..3c302d6487dad06410221f299146c8b2f2d64029 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
 #include <grp.h>
 #include <sys/types.h>
 #include <unistd.h>
index a73ac939a7495c16fe7d908fa302adc50944ab78..da3efb960abf50f44502d7c1ecbe868bd6b48f9f 100644 (file)
@@ -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"
index 12c9c4f7f362bb5013ec6e301e1e3118756ff18d..0aa56c088271bb341c6c8941b1d5e25d45794a47 100644 (file)
@@ -5,6 +5,8 @@
 #include <nss.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #include "sd-bus.h"
 
index f8db27ae2766d605cb0e535ad10736b67ef71d8b..8beae06d87d33a92a2656a914af569e6f578e59c 100644 (file)
@@ -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"
index c9d1c27792e2071f3b62cf5b49f4edf0b87208a8..60a310946d0e9dca612f67555e96e74b8b6059a6 100644 (file)
@@ -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;
index 360559811fa72393215f9f70ba2255897541333c..2f19b48fe24d6cbc2aad8c6f18801696ac083146 100644 (file)
@@ -1,5 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-label.h"
index 49a359fd3150c3a0f538a2d4555b597d127e7b1c..5464360f894cc9eb37c3926dcbcc000b85c77c50 100644 (file)
@@ -1,5 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <sys/stat.h>
+#include <sys/types.h>
+
 #include "sd-bus.h"
 #include "sd-daemon.h"
 
index 90f542a058c4928f5df35c72595882a33e1f2fc9..4e83fc83d54427738c726f7a7a91d9866d923044 100644 (file)
@@ -4,6 +4,8 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <sys/prctl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "main-func.h"
index 4d533f851a1364c83227a84d1fe0b4a8328ced8d..7b9e13f3f63bc93017ac5a6dea17a17690e4d76d 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <getopt.h>
+#include <locale.h>
 #include <net/if.h>
 
 #include "sd-bus.h"
index 44dc6552b4f06cbd49cd270799365105923fd889..0ee7340ffc6b36437de9d66ec0fb717c4a612fe6 100644 (file)
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <stdio.h>
+
 #include "alloc-util.h"
 #include "dns-domain.h"
 #include "resolved-dns-answer.h"
index 3d278366519c2636070048b42698f90b3f4ec0bd..291447f00e7ba20f075cc4305eb7f367c7054490 100644 (file)
@@ -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;
index ee21222e50768c96c312852670335a5b0820fe59..6a23d2bb8e8d40e92351eb8f373249ea26eeaa07 100644 (file)
@@ -1,5 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #include "fd-util.h"
 #include "fileio.h"
 #include "hostname-util.h"
index b3d35c83413f0b11f75e808db5af55594260a5a1..9b8239bd094236ab74764006bf969427fce91395 100644 (file)
@@ -1,9 +1,13 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
 #include <netinet/in.h>
 #include <poll.h>
 #include <stdio_ext.h>
 #include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #if HAVE_LIBIDN2
 #include <idn2.h>
index 5205071d3f0446609a77cd77296006c0353850e3..0435791ea0e17b1f0d9f131c656e55ec62f97272 100644 (file)
@@ -2,6 +2,9 @@
 
 #include <resolv.h>
 #include <stdio_ext.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #include "alloc-util.h"
 #include "dns-domain.h"
index 0845b2c1ae0d6b05aeba53fb540dfcbbe6aa9f6b..2ca9fbdc72dc954202b10ad04cfbbe205176b6d3 100644 (file)
@@ -1,5 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #include "sd-daemon.h"
 #include "sd-event.h"
 
index 8a92a4de6ec5908e6fe5f2685d3e48b5505a2148..16610cd4766335887fe311a4460f99229d99f043 100644 (file)
@@ -1,7 +1,11 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
 #include <linux/rfkill.h>
 #include <poll.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #include "sd-daemon.h"
 #include "sd-device.h"
index a5dfac01d4ac76c088ef987eedd656ede9d89f04..7d6c1109125bb4ab80e46bdcb17a2f2f3aa63f39 100644 (file)
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <unistd.h>
+
 #include "alloc-util.h"
 #include "escape.h"
 #include "fd-util.h"
index 3f2221f610a1f82c4ddc9c6bbb4d194fce3f1a12..0d05fab3452828c28937ed2ee2104cf9617d5f10 100644 (file)
@@ -2,6 +2,9 @@
 
 #include <getopt.h>
 #include <stdio.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 #include "sd-bus.h"
 #include "sd-event.h"
index 96335145138e93d631437c7d1e1d6c1096efdd47..1ccb4f8295f06a013060881c5defc290f9cd0de6 100644 (file)
@@ -2,6 +2,8 @@
 
 #include <errno.h>
 #include <stdbool.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 #include "acl-util.h"
 #include "alloc-util.h"
index af8da15236a9bcf799e0778dc2021a618ad97d39..e3e8c7346490a10479a10656c2bc30daef764304 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <stdio.h>
 #include <linux/magic.h>
+#include <unistd.h>
 
 #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) {
index 2e42c45740be3c02c96f7dfeb9c9628327284bfc..59bfdb239813ab44dfe90a7879772d520de1f801 100644 (file)
@@ -12,6 +12,7 @@
 #include "hashmap.h"
 #include "macro.h"
 #include "string-util.h"
+#include "time-util.h"
 
 typedef enum BusTransport {
         BUS_TRANSPORT_LOCAL,
index 4e8fc808cdbd90dc192e43352b51b5864258741f..a5c0a99b08a50286f997480d92d0281271f29cb5 100644 (file)
@@ -17,6 +17,7 @@
 #include "terminal-util.h"
 #include "time-util.h"
 #include "utf8.h"
+#include "util.h"
 
 #define DEFAULT_WEIGHT 100
 
index 253957d298ba7f5086986a42e2c5b8b3ab5f7bca..10431423e9ddeab3f8a7cd0b3dfda7f25f300029 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <errno.h>
+#include <locale.h>
 #include <math.h>
 #include <stdarg.h>
 #include <stdio_ext.h>
index 023f08d121266796262c82b61234af8eae1ace91..e5532c506ec71d3a7a47ba81c523283613d07ef1 100644 (file)
@@ -4,10 +4,11 @@
 #include <stdbool.h>
 #include <stddef.h>
 #include <stdint.h>
+#include <stdio.h>
 
 #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
index bf2597e65a12585ce398522b29a89d404d921fea..2abb0f62d27da46f6df7eed3d2bdb3ca02738c86 100644 (file)
@@ -24,6 +24,7 @@
 #include "string-util.h"
 #include "strv.h"
 #include "terminal-util.h"
+#include "util.h"
 
 static pid_t pager_pid = 0;
 
index 4cbd98bb34489a3c02bec798f7d18af86d4b6e24..8f4efc7996cc902838464e621a1530f5864b301b 100644 (file)
@@ -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);
index de28f00c656f2dbf84c23fbf4dff9348d6603531..7f23e5410239e425b65371d605ed95d99efd6e4a 100644 (file)
@@ -4,12 +4,15 @@
 ***/
 
 #include <errno.h>
+#include <fcntl.h>
 #include <linux/fs.h>
 #include <stdbool.h>
 #include <stddef.h>
 #include <stdio.h>
 #include <string.h>
 #include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <syslog.h>
 #include <unistd.h>
 
index b8f7537f7a0feb50be0d04a5bd210251a42f2c94..c8e789680d3455341c78df14513acefbd563aed0 100644 (file)
@@ -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"
index 7af0195aab83530247b6da40dae54a1089b84cd8..0ed358bb32988c133e13ef759780e287dd7cc2a3 100644 (file)
@@ -9,6 +9,9 @@
 #include <string.h>
 #include <sys/mount.h>
 #include <sys/swap.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 /* This needs to be after sys/mount.h :( */
 #include <libmount.h>
index 71bc8711211b9bbe6746b813f4e57321b1bea53d..11aabaf923d2391d284cfe9460bb92d1ab0ec2e6 100644 (file)
@@ -5,15 +5,20 @@
 ***/
 
 #include <errno.h>
+#include <fcntl.h>
 #include <getopt.h>
 #include <linux/fiemap.h>
 #include <stdio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #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"
index c67d79032378948028aa996740735d66a7a6af8a..bb2643a4804194e32278d0394aaae4fc3e1ea822 100644 (file)
@@ -7,6 +7,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 #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;
index 72a2f5796570e6bcc2441f86bc71147ba7fddc14..b56cfb426323fc6c8f8681ea11e360001801c0dd 100644 (file)
@@ -1,5 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
 #include "fd-util.h"
 #include "initreq.h"
 #include "io-util.h"
index 4f5307889ea5c5e1049d59214f3883e62450b904..7d8accc2fc0af85a64cc9575be6a75cadd77b65d 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
 #include <unistd.h>
 
 #include "async.h"
index 6469129fa4e1f0b0c048abe8f932cb32bfabb1b4..10417f662f9d3be4708c7d3c65626ef058df5e60 100644 (file)
@@ -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
index a79e0cf16b89ba910013bcc92d0ea86d977089c3..79b8dd49a71655ff653c8e0f197ba34fa0ec6a6d 100644 (file)
@@ -1,5 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <sys/types.h>
+#include <unistd.h>
+
 #include "acpi-fpdt.h"
 #include "boot-timestamps.h"
 #include "efivars.h"
index de5fa729cc4a8d13abb97fc18fb2cfbc28ccf48d..563b9969412b87bb128b24c647cddf1b04761b15 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <stdio.h>
 #include <sys/prctl.h>
 
 #include "alloc-util.h"
index a4b96da0457331f1fa0d3c42c6620241ca4b4646..6ca821581f33c629bba1d037faf8d3102f363d2d 100644 (file)
@@ -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;
index cba51e225c68c3264657081939310b8111171165..9888b65998fa0a60e426e39dfe3f4d8b788c8578 100644 (file)
@@ -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;
index bd873a39be5f979c8ba7553b9c54a24b09c148c9..4cd504e45c475175773d5da5d4ea9fb0567f92d3 100644 (file)
@@ -1,10 +1,11 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <stdio.h>
+
 #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,
index 325c3b32ccdf047d3fac2b70b8cdc47948e45b77..fdb0c7e87ffd5c879e32a68edfe2450ebeef40f8 100644 (file)
@@ -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);
index 4126a24ceb9fd10444e59a759c56b24309d7f781..ec34f9cd716b5622199de9b9894dfff1b73c8e2b 100644 (file)
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <unistd.h>
+
 #include "alloc-util.h"
 #include "fileio.h"
 #include "hostname-util.h"
index ec50e057a3655c38eed232a43409ce98302c259e..8840788310e52626bf4a09032ee4cec11b052fc9 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
 #include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #include "sd-daemon.h"
 #include "sd-id128.h"
index 73ea68f372c8be0cf6b586d67a80b43213621f80..cfddfe19a7b65f4362fb55f191eecf35d716d1da 100644 (file)
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <unistd.h>
+
 #include "alloc-util.h"
 #include "fileio.h"
 #include "install.h"
index f1d044082b275c504c0e0adf77a9af14d90bbb05..28d90be8964d1b19da6ed29f1bd8c6fc226da777 100644 (file)
@@ -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;
index be7642950653e7018260184eab26048eab9f2c6a..8c5aac8eb75bec42ff4e1abf6eb5f5d9c5b875cb 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <sys/mount.h>
+#include <unistd.h>
 
 #include "alloc-util.h"
 #include "def.h"
index cc2efecfd2ec9d319146f99730d1511c80bf1fcc..73ad2b25ddb281394cf5798e7e00f5806c9c58fe 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <sys/socket.h>
+#include <sys/stat.h>
 
 #include "alloc-util.h"
 #include "fd-util.h"
index 1ebe8d197202c55227a6a453b6f02023aa4bcbfe..a1a5eb47788281e09230a413cc7218b5637185aa 100644 (file)
@@ -5,6 +5,8 @@
 #include <linux/ip.h>
 #include <net/if.h>
 #include <linux/if_tunnel.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #include "sd-netlink.h"
 
index f1bba2a353fd0435833e315a847fdea9757b7c20..27afe36082f5a2660b78942fa0ac0a6c1ac85bb3 100644 (file)
@@ -3,6 +3,7 @@
 #include <dlfcn.h>
 #include <net/if.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 #include "af-list.h"
 #include "alloc-util.h"
index 53ec512ec39c604f098925c8a766a2e3034d2e05..3ad80d145d295fc8162b7f608a99f88378c78fe1 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <stdio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #include "alloc-util.h"
 #include "macro.h"
index 55208b179f011fe1c564bfc8f4d8390479408954..8620e72b2b736e83f8895e17d0297c629cf7b1b0 100644 (file)
@@ -1,11 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
-#include <string.h>
+#include <stdio.h>
 
 #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, ">>>");
index 771719a26753fdf725a4ec55ffe14f1fe8de700a..fac30126cee4881699a5ba28bf8b7b99a218a859 100644 (file)
@@ -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;
index 618da6e40dbc96554e17a3a1ceb281d115098de3..e0c513ad8ce55a495d0c30d12cd2771035b5d0ab 100644 (file)
@@ -1,8 +1,11 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
 #include <inttypes.h>
 #include <linux/fiemap.h>
 #include <stdio.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #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;
index cd4e78489442f43432d372814ecc891469b7aae0..057840d76fb3cd66362c11aa5c99c78a20f5dcb9 100644 (file)
@@ -1,8 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
+#include <grp.h>
+#include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include <grp.h>
 
 #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__);
index 8c1f91d4ef0bef17a89a15d7cea9abecfeacda60..064a5abdac690e61542250db68d75b138a059bae 100644 (file)
@@ -7,6 +7,7 @@
 #include "strv.h"
 #include "tests.h"
 #include "utf8.h"
+#include "util.h"
 
 static void test_string_erase(void) {
         char *x;
index e510b737c7de031e86a5194fc12005e7392bc587..8cd580e71922e3593421c376b8da8503283a5dbb 100644 (file)
@@ -1,7 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <fcntl.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <unistd.h>
 
 #include "alloc-util.h"
 #include "fd-util.h"
index 6b015290683fb1f46cfe6b4235403be7cdca40a5..8a0251e13a87906411029c7eb7ae7800569fa239 100644 (file)
@@ -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"
index 959d6d4614cc11f86b7d376d7269fe87fa070c36..fd2443e3cbc7e9aad617485e172e3c2641e3af35 100644 (file)
@@ -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"
index 801824ad6771ae4c6053220d53ec0f59c574ad74..1a507bc00a7fa8176dca96e73d322fa9dc796271 100644 (file)
@@ -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;
index efb9664b3ce9d98f5671fabb1ce54100a90b84a4..24593c75d9e72dffd2f7741c3bee003f318b6dea 100644 (file)
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <getopt.h>
+
 #include "macro.h"
 #include "strv.h"
 #include "verbs.h"
index b3f44bfaab5685ffb0fb63d0d87c4f6a13d2edb8..fe91854ac8ca836775e381da5186bae2a1d9b34a 100644 (file)
@@ -2,6 +2,8 @@
 
 #include <errno.h>
 #include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "sd-bus.h"
index 6fde4a316b13bef33389e50560af6950577bab6b..4c00fa409f04a48bfddc0d67d8a4c4b0923f34ed 100644 (file)
@@ -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"
index b4f70c0007690f86ebc2f4000aeb7ef417714906..73d40c0948470e07df9022be4c2992d3d11bc760 100644 (file)
@@ -1,5 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <sys/stat.h>
+#include <sys/types.h>
+
 #include "sd-daemon.h"
 #include "sd-event.h"
 
index 2d3418dda13a4f46c1662ec0124181b1ca9d44fb..790177d6810202449e1e1afafa120fb82efd569a 100644 (file)
 #include <sys/prctl.h>
 #include <sys/signalfd.h>
 #include <sys/socket.h>
-#include <sys/wait.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <sys/un.h>
+#include <sys/wait.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
index 07caaa37949798924a15a6059184f181284f02f8..ca7ca3c37f51cfc4db206ea77a713ded321bf95b 100644 (file)
@@ -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;
index c76c2d1f5180f5353518fa96fcfc62c2a9d0ea03..bbd14165d5ad4b4199c5a554911bffdb81b58e9f 100644 (file)
@@ -1,9 +1,13 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 #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"   \
index 7d66ed335774a222ae24f91b82ab38f0be9dbc4e..bfc78b9739abf4aefd9d25c7bd436ba0d5da2f7b 100644 (file)
@@ -2,6 +2,8 @@
 
 #include <errno.h>
 #include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #if HAVE_AUDIT
index 490d9f01a9b7fd33383e36547f1989fcbf483dc8..c24142951709eadd0e59606c03655f1f663a8f02 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
 #include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #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;
index ebdeba3e8e93dda1199ccdaf1db57fcae3bca6ba..67dc2e49f994af5b39cacab9c90ea1c4ccfa8b6d 100644 (file)
@@ -15,6 +15,8 @@
 #include <sys/ioctl.h>
 #include <sysexits.h>
 #include <termios.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "alloc-util.h"