]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
clang-tidy: Fix all remaining misc-include-cleaner violations
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 23 May 2025 11:38:45 +0000 (13:38 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 22 Nov 2025 09:19:41 +0000 (10:19 +0100)
- Remove unused includes
- Add common false positive headers to misc-include-cleaner.IgnoreHeaders
- Add IWYU pragma keep for uncommon false positive headers

123 files changed:
.clang-tidy
src/analyze/analyze-nvpcrs.c
src/basic/alloc-util.h
src/basic/architecture.h
src/basic/confidential-virt.c
src/basic/dirent-util.h
src/basic/format-util.h
src/basic/raw-clone.c
src/basic/string-table.h
src/basic/time-util.c
src/basic/unit-def.c
src/basic/virt.c
src/battery-check/battery-check.c
src/boot/efi-log.h
src/core/apparmor-setup.c
src/core/automount.c
src/core/bpf/restrict-fs/restrict-fs-skel.h
src/core/bpf/restrict-ifaces/restrict-ifaces-skel.h
src/core/bpf/socket-bind/socket-bind-skel.h
src/core/cgroup.c
src/core/dbus-unit.c
src/core/dbus-util.h
src/core/exec-credential.c
src/core/exec-invoke.c
src/core/execute.h
src/core/service.c
src/core/socket.c
src/core/unit.c
src/core/varlink-manager.c
src/core/varlink-unit.c
src/coredump/coredump-backtrace.c
src/coredump/coredump-context.c
src/coredump/coredump-kernel-helper.c
src/coredump/coredump-receive.c
src/cryptsetup/cryptsetup.c
src/firstboot/firstboot.c
src/fundamental/iovec-util-fundamental.h
src/fundamental/sha1-fundamental.c
src/fundamental/sha256-fundamental.c
src/fundamental/string-util-fundamental.h
src/import/pull-tar.c
src/include/override/linux/sctp.h [new file with mode: 0644]
src/include/override/sched.h
src/libsystemd-network/sd-dns-resolver.c
src/libsystemd/sd-journal/audit-type.c
src/libsystemd/sd-journal/audit-type.h
src/libsystemd/sd-journal/audit_type-to-name.awk
src/libsystemd/sd-journal/journal-send.h
src/libsystemd/sd-journal/test-journal-stream.c
src/libsystemd/sd-json/json-util.h
src/libsystemd/sd-netlink/netlink-types-nfnl.c
src/machine/machined-resolve-hook.c
src/mountfsd/mountfsd-manager.c
src/network/bpf/sysctl-monitor/sysctl-monitor-skel.h
src/network/networkd-resolve-hook.c
src/network/networkd-sysctl.c
src/network/test-network.c
src/nspawn/nspawn-oci.c
src/nsresourced/bpf/userns-restrict/userns-restrict-skel.h
src/nsresourced/nsresourced-manager.c
src/nsresourced/userns-restrict.c
src/nsresourced/userns-restrict.h
src/oom/test-oomd-util.c
src/remount-fs/remount-fs.c
src/resolve/resolved-dns-delegate-bus.c
src/resolve/resolved-resolv-conf.c
src/resolve/test-resolved-stream.c
src/shared/acl-util.c
src/shared/apparmor-util.c
src/shared/blkid-util.c
src/shared/bus-get-properties.h
src/shared/calendarspec.c
src/shared/copy.c
src/shared/coredump-util.c
src/shared/discover-image.c
src/shared/dns-rr.c
src/shared/efi-api.c
src/shared/idn-util.c
src/shared/libarchive-util.c
src/shared/libcrypt-util.c
src/shared/main-func.h
src/shared/mkdir-label.c
src/shared/password-quality-util-passwdqc.c
src/shared/password-quality-util-passwdqc.h
src/shared/password-quality-util-pwquality.c
src/shared/password-quality-util-pwquality.h
src/shared/reread-partition-table.c
src/shared/securebits-util.c
src/shared/tests.c
src/shared/tests.h
src/shared/tpm2-event-log.h
src/shared/tpm2-util.c
src/shared/varlink-io.systemd.Unit.c
src/shutdown/detach-md.c
src/shutdown/shutdown.c
src/ssh-generator/ssh-issue.c
src/sysctl/sysctl.c
src/sysext/sysext.c
src/systemctl/systemctl-show.c
src/test/test-capability-list.c
src/test/test-chown-rec.c
src/test/test-clock.c
src/test/test-copy.c
src/test/test-dirent-util.c
src/test/test-exec-util.c
src/test/test-lock-util.c
src/test/test-mount-util.c
src/test/test-mountpoint-util.c
src/test/test-nsresource.c
src/test/test-path-util.c
src/test/test-reread-partition-table.c
src/test/test-serialize.c
src/test/test-stat-util.c
src/test/test-tables.c
src/test/test-terminal-util.c
src/test/test-tests.c
src/test/test-varlink-idl.c
src/test/test-xattr-util.c
src/timedate/timedatectl.c
src/tpm2-setup/tpm2-setup.c
src/udev/udev-rules.c
src/udev/udevadm-util.c
src/vpick/vpick-tool.c

index 55bd0886d33ade3f42913158faec1cf581512ebd..03d45185d923b8d8b90ced6e14d50d5b15616b21 100644 (file)
@@ -6,6 +6,27 @@ Checks: '
     readability-duplicate-include,
     bugprone-argument-comment
 '
+CheckOptions:
+  misc-include-cleaner.MissingIncludes: 'false'
+  # These all lead to common false positives by clang-tidy where it tries to
+  # remove these includes even though they're required in some situations (many
+  # of them related to musl).
+  misc-include-cleaner.IgnoreHeaders: '
+    endian\.h;
+    getopt\.h;
+    sys/stat\.h;
+    sys/statvfs\.h;
+    sys/syscall\.h;
+    sys/timex\.h;
+    sys/uio\.h;
+    netinet/in\.h;
+    net/if\.h;
+    net/if_arp\.h;
+    runtime-scope\.h;
+    varlink-io\.systemd\..*;
+    varlink-idl-common\.h;
+    unistd\.h
+'
 WarningsAsErrors: '*'
 HeaderFileExtensions:
   - h
index 0fc7b163cf84324b8ed20c3498db0887a6dd7e41..546523175c26836d19133a637959e419b1f83a56 100644 (file)
@@ -7,7 +7,6 @@
 #include "constants.h"
 #include "format-table.h"
 #include "hexdecoct.h"
-#include "string-util.h"
 #include "strv.h"
 #include "tpm2-util.h"
 
index 577a8174faf78bb72fa527e82983374f4d20fab1..cd062d5fe3efc61c5cab10b78689b045f7bbf284 100644 (file)
@@ -4,7 +4,7 @@
 #include <stdlib.h>
 
 #include "basic-forward.h"
-#include "memory-util.h"
+#include "memory-util.h"        /* IWYU pragma: keep */
 
 #if HAS_FEATURE_MEMORY_SANITIZER
 #  include <sanitizer/msan_interface.h>
index 261a9288e86062fb0e2d40eff71bdc33b389bde9..d7c3f23c3ddbf0198ef2d8420c64531626097193 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <endian.h>     /* IWYU pragma: keep */
+#include <endian.h>
 
 #include "basic-forward.h"
 
index 3e07e3c3a24b7980d3c475fc335d2adc40fa9416..a5996b244bd15c1431578442b36bbae5b81e6db5 100644 (file)
@@ -9,9 +9,9 @@
 
 #include "confidential-virt.h"
 #include "confidential-virt-fundamental.h"
-#include "errno-util.h"
+#include "errno-util.h"                                 /* IWYU pragma: keep */
 #include "fd-util.h"
-#include "fileio.h"
+#include "fileio.h"                                     /* IWYU pragma: keep */
 #include "log.h"
 #include "string-table.h"
 #include "string-util.h"
index 521dbd5de7248b3b7d65ea8cf1b02aa9d9e8d229..76ae40eb5e193c75de1b12fec4fbc825a66f122c 100644 (file)
@@ -1,10 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <dirent.h>     /* IWYU pragma: export */
+#include <dirent.h>             /* IWYU pragma: export */
 
 #include "basic-forward.h"
-#include "path-util.h"
+#include "path-util.h"          /* IWYU pragma: keep */
 
 bool dirent_is_file(const struct dirent *de) _pure_;
 bool dirent_is_file_with_suffix(const struct dirent *de, const char *suffix) _pure_;
index 16727c45bd4950315fd9f1a2a866ce12572676c4..ac7f7b21a1ac950e22c289b908bb1bf26286c56b 100644 (file)
@@ -1,9 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "cgroup-util.h"
 #include "basic-forward.h"
-#include "stdio-util.h"
+#include "cgroup-util.h"
+#include "stdio-util.h"         /* IWYU pragma: keep */
 
 assert_cc(sizeof(pid_t) == sizeof(int32_t));
 #define PID_PRI PRIi32
index aa750acb6d9d5aea3c663aeb2d886128e29b55ef..5f560178c899760791aa429239045aa26a28ccca 100644 (file)
@@ -4,9 +4,9 @@
   Copyright © 2016 Michael Karcher
 ***/
 
-#include <errno.h>
+#include <errno.h>                      /* IWYU pragma: keep */
 #include <sched.h>
-#include <sys/syscall.h>
+#include <sys/syscall.h>                /* IWYU pragma: keep */
 #include <unistd.h>
 
 #include "process-util.h"
index 444de4161f36f17280cfa3a5a09dfbbcd41c5257..11f57d6fed1ae0b28ebe4d06371761e36d3b7eea 100644 (file)
@@ -1,7 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
-
 #pragma once
 
+#include <stdio.h>
+
 #include "basic-forward.h"
 
 const char* string_table_lookup_to_string(const char * const *table, size_t len, ssize_t i) _const_;
index c612606a72ae0bdd718fed727d5c1bbb5104dd65..62f1fcaed83379b16ebf5b78ba9ed3d262e24add 100644 (file)
@@ -1,7 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdlib.h>
-#include <sys/mman.h>
 #include <sys/timerfd.h>
 #include <threads.h>
 #include <unistd.h>
 #include "env-util.h"
 #include "errno-util.h"
 #include "extract-word.h"
+#include "hexdecoct.h"          /* IWYU pragma: keep */
 #include "fd-util.h"
 #include "fileio.h"
 #include "fs-util.h"
-#include "hexdecoct.h"
 #include "io-util.h"
 #include "log.h"
 #include "parse-util.h"
 #include "path-util.h"
-#include "process-util.h"
 #include "stat-util.h"
 #include "stdio-util.h"
 #include "string-table.h"
index 9179897f3cceabd051dd3634d993becb2b378c6f..e8afaf1c3f7df3f119fa3a056ec77b2ea786061d 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <stdio.h>
-
 #include "alloc-util.h"
 #include "bus-label.h"
 #include "glyph-util.h"
index 55d7c51270e57c759eea3782405321b987a226c4..2493ef8ac7f7b40fb2de869d26845b165cabd0b6 100644 (file)
@@ -8,7 +8,7 @@
 #include <unistd.h>
 
 #include "alloc-util.h"
-#include "dirent-util.h"
+#include "dirent-util.h"        /* IWYU pragma: keep */
 #include "env-util.h"
 #include "extract-word.h"
 #include "fd-util.h"
index 78636d77940024d9eb5b9ed0b78efb50fffa621b..ef4038905e362b57c459c108aeb4445e308ccb03 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
-#include <sys/socket.h>
+#include <sys/socket.h>         /* IWYU pragma: keep */
 
 #include "sd-messages.h"
 
index 459838782b6414e5ec49ae3e29326de5d1ae6376..2c340a4a9dcf365676eecc04cc0cca121ac24ddb 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "efi.h"
 #include "efi-string.h"
-#include "proto/simple-text-io.h"
+#include "proto/simple-text-io.h"       /* IWYU pragma: keep */
 
 #if defined __has_attribute
 #  if __has_attribute(no_stack_protector)
index c4ea14b1d580e92d2efbccbb004e2ca71ae03300..19b7282b372aa11b9e111ef59fc923fbcf5d0c04 100644 (file)
@@ -1,9 +1,11 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "apparmor-setup.h"
+
+#if HAVE_APPARMOR
 #include <unistd.h>
 
 #include "alloc-util.h"
-#include "apparmor-setup.h"
 #include "apparmor-util.h"
 #include "errno-util.h"
 #include "fd-util.h"
@@ -11,6 +13,7 @@
 #include "log.h"
 #include "string-util.h"
 #include "strv.h"
+#endif
 
 int mac_apparmor_setup(void) {
 #if HAVE_APPARMOR
index d312e2a4275f54a837b63aac8779f62aa1224d9c..b53d91dda1af7c85aac103ca2da14b35c65121c6 100644 (file)
@@ -2,7 +2,7 @@
 
 #include <fcntl.h>
 #include <linux/auto_dev-ioctl.h>
-#include <sys/mount.h>
+#include <sys/mount.h>                  /* IWYU pragma: keep */
 #include <sys/stat.h>
 #include <unistd.h>
 
index 796c85cf54e431583d558d5416d1e5c926aa0c97..06935f2cd83b5f7eba5707ca1aaaba7cabd5d4a1 100644 (file)
@@ -7,11 +7,11 @@
  * fine given that LGPL-2.1-or-later downgrades to GPL if needed.
  */
 
-#include "bpf-dlopen.h"
+#include "bpf-dlopen.h"                         /* IWYU pragma: keep */
 
 /* libbpf is used via dlopen(), so rename symbols */
 #define bpf_object__open_skeleton sym_bpf_object__open_skeleton
 #define bpf_object__load_skeleton sym_bpf_object__load_skeleton
 #define bpf_object__destroy_skeleton sym_bpf_object__destroy_skeleton
 
-#include "bpf/restrict-fs/restrict-fs.skel.h"
+#include "bpf/restrict-fs/restrict-fs.skel.h"   /* IWYU pragma: export */
index 7172929e41cabdb596e60be4c291e19f786c97c6..53ba2e5b5a02025fcd8f1610bed237d0e7c05c31 100644 (file)
@@ -7,11 +7,11 @@
  * fine given that LGPL-2.1-or-later downgrades to GPL if needed.
  */
 
-#include "bpf-dlopen.h"
+#include "bpf-dlopen.h"                                         /* IWYU pragma: keep */
 
 /* libbpf is used via dlopen(), so rename symbols */
 #define bpf_object__open_skeleton sym_bpf_object__open_skeleton
 #define bpf_object__load_skeleton sym_bpf_object__load_skeleton
 #define bpf_object__destroy_skeleton sym_bpf_object__destroy_skeleton
 
-#include "bpf/restrict-ifaces/restrict-ifaces.skel.h"
+#include "bpf/restrict-ifaces/restrict-ifaces.skel.h"           /* IWYU pragma: export */
index b1dfa246caf1c231ffe78e552c7dacbcc0dba9df..d83dd89e529629d1ec8101830e28d2f90892668c 100644 (file)
@@ -7,11 +7,11 @@
  * fine given that LGPL-2.1-or-later downgrades to GPL if needed.
  */
 
-#include "bpf-dlopen.h"
+#include "bpf-dlopen.h"                                 /* IWYU pragma: keep */
 
 /* libbpf is used via dlopen(), so rename symbols */
 #define bpf_object__open_skeleton sym_bpf_object__open_skeleton
 #define bpf_object__load_skeleton sym_bpf_object__load_skeleton
 #define bpf_object__destroy_skeleton sym_bpf_object__destroy_skeleton
 
-#include "bpf/socket-bind/socket-bind.skel.h"
+#include "bpf/socket-bind/socket-bind.skel.h"           /* IWYU pragma: export */
index 7242734e5ae88de8095c062062a3957958ec60bc..374976edb1e40ed236107150717010e5be85f61e 100644 (file)
 #include "virt.h"
 
 #if BPF_FRAMEWORK
-#include "bpf-dlopen.h"
 #include "bpf-link.h"
 #include "bpf-restrict-fs.h"
-#include "bpf/restrict-fs/restrict-fs-skel.h"
 #endif
 
 #define CGROUP_CPU_QUOTA_DEFAULT_PERIOD_USEC (100 * USEC_PER_MSEC)
index ed4646f75aa833e8c98e23255c2164ea99e6cdc7..34ead16ee1d6316b6fcba8f1961fac7c777eb4e0 100644 (file)
@@ -32,7 +32,7 @@
 #include "special.h"
 #include "string-util.h"
 #include "strv.h"
-#include "transaction.h"
+#include "transaction.h"                /* IWYU pragma: keep */
 #include "unit-name.h"
 #include "web-util.h"
 
index f28a1ca7256649bbba786a4128535bd8eb743644..bccefdb58d42204b2ad6c2ccb6516c0cb6f78260 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-bus.h"
+#include "sd-bus.h"             /* IWYU pragma: keep */
 
 #include "core-forward.h"
 #include "string-util.h"
index 7321868d5d5716bf6e0c3869c8f4209a350ca0f5..60b2a91fa041ac8e9b180d2cb800cf78c8fe5cde 100644 (file)
 #include "ordered-set.h"
 #include "path-lookup.h"
 #include "path-util.h"
-#include "process-util.h"
 #include "random-util.h"
 #include "recurse-dir.h"
 #include "rm-rf.h"
 #include "siphash24.h"
 #include "stat-util.h"
+#include "string-util.h"
 #include "strv.h"
 #include "user-util.h"
 
index bebb2f45a0f43876bc4e437911ac86b5a37c5ff8..59808477d1c92ef7caa0b8a78585ec1791503b5f 100644 (file)
@@ -1,9 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <grp.h>
-#include <linux/sched.h>
 #include <linux/securebits.h>
 #include <poll.h>
+#include <sched.h>
 #include <sys/eventfd.h>
 #include <sys/ioctl.h>
 #include <sys/ioprio.h>
@@ -15,7 +15,7 @@
 
 #include "sd-messages.h"
 
-#include "apparmor-util.h"
+#include "apparmor-util.h"      /* IWYU pragma: keep */
 #include "argv-util.h"
 #include "ask-password-api.h"
 #include "barrier.h"
index 62dd94e91d05ff9a789699b2e1e97cc953b8747b..7b6ace99b3eea8ecc6a9a59fc488409f5810ea0f 100644 (file)
@@ -6,7 +6,6 @@
 #include "sd-id128.h"
 
 #include "bus-unit-util.h"
-#include "cgroup-util.h"
 #include "core-forward.h"
 #include "cpu-set-util.h"
 #include "exec-util.h"
index 59a81028e617135f4d1c016d71d4a1bbfad61764..a9d90354b695ef319013065c1c1176c5a72a31c6 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/audit.h>
+#include <linux/audit.h>        /* IWYU pragma: keep */
 #include <math.h>
 #include <sys/stat.h>
 #include <unistd.h>
index 3bb0149e625fc2ea913b1bcd00597887253dcfe1..971d297beb87868d27a7f11c4d59897978f62e1c 100644 (file)
@@ -1,6 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <arpa/inet.h>
 #include <fcntl.h>
 #include <linux/sctp.h>
 #include <mqueue.h>
index ddae43a673f712dfa342d9d7154f5ef386b538f4..b840370e24449bb3d38928fe5c4da685c06b90b7 100644 (file)
@@ -11,7 +11,6 @@
 #include "all-units.h"
 #include "alloc-util.h"
 #include "ansi-color.h"
-#include "bpf-firewall.h"
 #include "bpf-restrict-fs.h"
 #include "bus-common-errors.h"
 #include "bus-internal.h"
index 6c82ac05f12f6514dc3c09d2f0317b27e8b97b86..7493c963e83a5fb036a506a31b23eb82f7e575f9 100644 (file)
@@ -12,7 +12,6 @@
 #include "json-util.h"
 #include "manager.h"
 #include "pidref.h"
-#include "process-util.h"
 #include "selinux-access.h"
 #include "set.h"
 #include "strv.h"
index b193753c01d9cc8a3a61f402828086a98a0d25ef..634d2fadbfb3d4a82416cc3cf74a3ebc02fecebe 100644 (file)
@@ -17,7 +17,6 @@
 #include "strv.h"
 #include "unit.h"
 #include "varlink-cgroup.h"
-#include "varlink-common.h"
 #include "varlink-execute.h"
 #include "varlink-unit.h"
 #include "varlink-util.h"
index 4ee38341c3ddd1b367fce67f83fc47d998b4cc66..0a2dec2313632231a5ff24c1660c304080eabff8 100644 (file)
@@ -10,8 +10,6 @@
 #include "format-util.h"
 #include "journal-importer.h"
 #include "log.h"
-#include "string-util.h"
-#include "user-util.h"
 
 int coredump_backtrace(int argc, char *argv[]) {
         _cleanup_(journal_importer_cleanup) JournalImporter importer = JOURNAL_IMPORTER_INIT(STDIN_FILENO);
index 3b13289e429620618f7b68d0852837aaf0c8fa13..399de7f0d92652cbb57073217eefac0995acf584 100644 (file)
@@ -3,7 +3,6 @@
 #include "sd-login.h"
 #include "sd-messages.h"
 
-#include "coredump-config.h"
 #include "coredump-context.h"
 #include "coredump-util.h"
 #include "dirent-util.h"
index 105b943faa80dbee6e463ff0f54a03ad696d4c91..21e7936f3c0d270f582c5760438481ded5fb9649 100644 (file)
@@ -10,7 +10,6 @@
 #include "coredump-util.h"
 #include "fd-util.h"
 #include "format-util.h"
-#include "iovec-wrapper.h"
 #include "log.h"
 #include "signal-util.h"
 
index c1d2df4a7daa9676e74de796fc372f9102d2b441..949789b76fcdb0cd04f921bd3c7e1fde1cfb53ea 100644 (file)
@@ -8,7 +8,6 @@
 #include "coredump-submit.h"
 #include "iovec-util.h"
 #include "iovec-wrapper.h"
-#include "fd-util.h"
 #include "log.h"
 #include "socket-util.h"
 
index 967994df3e110c5132c7d7890443fd3a97a6209b..7c924980d3c49cd1b8570d7425594bcd3226f247 100644 (file)
@@ -28,7 +28,6 @@
 #include "extract-word.h"
 #include "fileio.h"
 #include "fs-util.h"
-#include "fstab-util.h"
 #include "hexdecoct.h"
 #include "json-util.h"
 #include "libfido2-util.h"
@@ -36,7 +35,6 @@
 #include "log.h"
 #include "main-func.h"
 #include "memory-util.h"
-#include "mount-util.h"
 #include "nulstr-util.h"
 #include "parse-util.h"
 #include "path-util.h"
index 4c24d38716d97e7ffe7957eee86ed52ab83522e1..9c0ec390f102c36c35e7ab1f4f49117d91d26dc2 100644 (file)
@@ -29,7 +29,6 @@
 #include "hostname-util.h"
 #include "image-policy.h"
 #include "kbd-util.h"
-#include "label.h"
 #include "label-util.h"
 #include "libcrypt-util.h"
 #include "locale-setup.h"
index ef193a0dec3cacd9ba3257a10806cd1158e8a176..fbdd76398d66d1287f0b1458be22154e20357a57 100644 (file)
@@ -5,7 +5,7 @@
 #include <sys/uio.h>
 #endif
 
-#include "assert-fundamental.h"
+#include "assert-fundamental.h"         /* IWYU pragma: keep */
 #include "macro-fundamental.h"
 
 #if SD_BOOT
index b8d100ff6b384ca12141ff4cad3281579d607038..b2af1e98885ed55c063cba34d335bb45e53fa3db 100644 (file)
@@ -77,7 +77,7 @@ modified for use with systemd
 */
 
 #if SD_BOOT
-#  include "efi-string.h"
+#  include "efi-string.h"       /* IWYU pragma: keep */
 #else
 #  include <string.h>
 #endif
index bbf84ee9d60930c4600ca1683a0537f9ca80e07f..463b4ccde7c3a25fd4c5b57e28ec12d9f3ee5294 100644 (file)
@@ -22,7 +22,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #if SD_BOOT
-#  include "efi-string.h"
+#  include "efi-string.h"       /* IWYU pragma: keep */
 #else
 #  include <string.h>
 #endif
index 98fcc0881fc968a4cdc9e2180bef83912e89baaa..2aa8d43bf9340c091fc1e7bbac63e64675ff5ec0 100644 (file)
@@ -8,7 +8,7 @@
 #  include <string.h>
 #endif
 
-#include "assert-fundamental.h"
+#include "assert-fundamental.h"         /* IWYU pragma: keep */
 #include "macro-fundamental.h"
 
 /* What is interpreted as whitespace? */
index 05b58f7976442a5a556ec80c537de1c868576f7a..c01e5eafe2c4bc04af012f9952a1c2a072283e93 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <dirent.h>
-
 #include "sd-daemon.h"
 #include "sd-event.h"
 
diff --git a/src/include/override/linux/sctp.h b/src/include/override/linux/sctp.h
new file mode 100644 (file)
index 0000000..8f4a558
--- /dev/null
@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#pragma once
+
+/* The kernel header depends on <arpa/inet.h> being included. */
+
+#include <arpa/inet.h>
+#include_next <linux/sctp.h>    /* IWYU pragma: export */
index 1810f52e3d239150d006f8520a5a38f81a737a6c..ce40c009b45feac6801fe6406e43945c1a7ca258 100644 (file)
@@ -4,7 +4,8 @@
 /* sched.h includes linux/sched/types.h since glibc-2.41 (21571ca0d70302909cf72707b2a7736cf12190a0),
  * to make struct sched_attr being defined.
  * Note, this must be included before sched.h, otherwise the headers conflict with each other. */
-#include <linux/sched/types.h>
+#include <linux/sched.h>        /* IWYU pragma: export */
+#include <linux/sched/types.h>  /* IWYU pragma: export */
 
 #include_next <sched.h>         /* IWYU pragma: export */
 
index f2283f004746b951a0dfa0c843ca8adcface962b..c8c6618c725f1a22528a497886fa8dc5efb38d4f 100644 (file)
@@ -6,8 +6,6 @@
 #include "errno-util.h"
 #include "siphash24.h"
 #include "socket-netlink.h"
-#include "stdio-util.h"
-#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "unaligned.h"
index 097f725e8704e3b17e7dbc4416b4f628e721e359..a304ce8c4bb3b7e4de8f6a8cb99ab09920e0ca74 100644 (file)
@@ -1,7 +1,3 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/audit.h>
-
-#include "audit-type.h"
-
 #include "audit_type-to-name.inc"
index f9ed66fdf8be5867e7cfd3b602d35c423b0a7b6c..dd74102049223aa1bfddeba1a7991edb73121176 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <stdio.h>
+#include <stdio.h>      /* IWYU pragma: keep */
 
 #include "sd-forward.h"
 
index a859c44d451c0ee3b4c8653c9d7b4a5941d0066c..5dbba45af1bc56e2ceb9201636e9c5d05c1d72da 100644 (file)
@@ -1,6 +1,9 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
 BEGIN{
+        print "#include <linux/audit.h>"
+        print ""
+        print "#include \"audit-type.h\""
         print "const char *audit_type_to_string(int type) {"
         print "        switch (type) {"
 }
index e5394e947182b18de844dc01bf4de3d388d112cb..7738efd395f1380aa00e996b42ef8a16057224d9 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "syslog-util.h"
+#include "syslog-util.h"        /* IWYU pragma: keep */
 
 int journal_fd_nonblock(bool nonblock);
 void close_journal_fd(void);
index 512ec132ef6ef3eb648e9866fe4548648ea2f992..efd4eb0a630b908a506e96af90d16d17182a20c6 100644 (file)
@@ -10,7 +10,6 @@
 #include "iovec-util.h"
 #include "journal-file-util.h"
 #include "journal-internal.h"
-#include "log.h"
 #include "parse-util.h"
 #include "rm-rf.h"
 #include "tests.h"
index f4b9b4e7e11eb38affc2c8094eda8859a1ec4b41..753eb30f65e0b02ddfbe5dfa5ae9e5cfcb71c4a5 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "sd-forward.h"
 #include "log.h"
-#include "string-util.h"
+#include "string-util.h"        /* IWYU pragma: keep */
 
 #define JSON_VARIANT_REPLACE(v, q)        \
         do {                              \
index 289040935bdd84bf796574fda2a301affc32257a..3520961aed9895b5c286880a9223cc224a06272f 100644 (file)
@@ -3,7 +3,7 @@
 #include <linux/if.h>
 #include <linux/netfilter/nf_tables.h>
 #include <linux/netfilter/nfnetlink.h>
-#include <linux/netlink.h>
+#include <linux/netlink.h>              /* IWYU pragma: keep */
 
 #include "netlink-types-internal.h"
 
index c0bd5fda2836c6dc74021dd1ee03003a615ee524..d022edc1691fbf85816dda25eff4e1182e05044f 100644 (file)
@@ -2,13 +2,13 @@
 
 #include "sd-json.h"
 
+#include "alloc-util.h"
 #include "dns-answer.h"
 #include "dns-domain.h"
 #include "dns-packet.h"
 #include "dns-question.h"
 #include "dns-rr.h"
 #include "hashmap.h"
-#include "json-util.h"
 #include "local-addresses.h"
 #include "log.h"
 #include "machine.h"
index bebf4104f6739519079de38d1213174bdcb19daa..5714f7c8c5383ba3b629ba5c96a79276b9a2f58c 100644 (file)
@@ -19,7 +19,6 @@
 #include "set.h"
 #include "signal-util.h"
 #include "socket-util.h"
-#include "stdio-util.h"
 #include "string-util.h"
 #include "time-util.h"
 #include "umask-util.h"
index 7d664896c903d31582f2cca078131ee41835f5bd..e1ebc3e509a2cb97b27a738278ae228426627398 100644 (file)
@@ -7,11 +7,11 @@
  * fine given that LGPL-2.1-or-later downgrades to GPL if needed.
  */
 
-#include "bpf-dlopen.h"
+#include "bpf-dlopen.h"                                 /* IWYU pragma: keep */
 
 /* libbpf is used via dlopen(), so rename symbols */
 #define bpf_object__destroy_skeleton sym_bpf_object__destroy_skeleton
 #define bpf_object__load_skeleton sym_bpf_object__load_skeleton
 #define bpf_object__open_skeleton sym_bpf_object__open_skeleton
 
-#include "bpf/sysctl-monitor/sysctl-monitor.skel.h"
+#include "bpf/sysctl-monitor/sysctl-monitor.skel.h"     /* IWYU pragma: export */
index 3abe8262e2a3c3a9ed5b72bd390f6986ed859130..bac5cd5cfe0a4e2d1d445467128fe935b657bd89 100644 (file)
@@ -11,7 +11,6 @@
 #include "dns-packet.h"
 #include "dns-question.h"
 #include "dns-rr.h"
-#include "env-util.h"
 #include "errno-util.h"
 #include "fd-util.h"
 #include "networkd-link.h"
index 81316588291ea4078e7fec0a205e821bdec0813b..f1a77dad009fc63aee9bce0871649d4fc340e76d 100644 (file)
@@ -5,6 +5,7 @@
 #include "sd-messages.h"
 
 #include "af-list.h"
+#include "bpf-dlopen.h"
 #include "conf-parser.h"
 #include "alloc-util.h"
 #include "cgroup-util.h"
index 3831ee9e76f68be7ffda9dc0d212e0c606785394..89435c609ba07b9c060932e6287ac97e81bc6048 100644 (file)
@@ -9,7 +9,6 @@
 #include "network-internal.h"
 #include "networkd-manager.h"
 #include "networkd-route-util.h"
-#include "string-util.h"
 #include "strv.h"
 #include "tests.h"
 
index b1a6e41cfb1d02d6308af4139b7d342ba3ab73b3..70bea70c0be25f884c549791fe0d5ccf959553ea 100644 (file)
@@ -13,7 +13,6 @@
 #include "cpu-set-util.h"
 #include "device-util.h"
 #include "devnum-util.h"
-#include "env-util.h"
 #include "hostname-util.h"
 #include "json-util.h"
 #include "nspawn-mount.h"
index ef158e962bb7794e12b635eefb74c0e344e4f97c..7ed12dea9577c5d282c62d9c2291e4844eb251ac 100644 (file)
@@ -7,7 +7,7 @@
  * fine given that LGPL-2.1-or-later downgrades to GPL if needed.
  */
 
-#include "bpf-dlopen.h"
+#include "bpf-dlopen.h"                                 /* IWYU pragma: keep */
 
 /* libbpf is used via dlopen(), so rename symbols */
 #define bpf_object__attach_skeleton sym_bpf_object__attach_skeleton
@@ -15,4 +15,4 @@
 #define bpf_object__load_skeleton sym_bpf_object__load_skeleton
 #define bpf_object__open_skeleton sym_bpf_object__open_skeleton
 
-#include "bpf/userns-restrict/userns-restrict.skel.h"
+#include "bpf/userns-restrict/userns-restrict.skel.h"   /* IWYU pragma: export */
index 96e63cdea165550ea02b1d47275c15ff335acfcb..5aa429a08813e8e7c288036e26d74c5c0b1b43a1 100644 (file)
@@ -8,6 +8,7 @@
 #include "bpf-dlopen.h"
 #if HAVE_VMLINUX_H
 #include "bpf-link.h"
+#include "bpf/userns-restrict/userns-restrict-skel.h"
 #endif
 #include "build-path.h"
 #include "common-signal.h"
@@ -26,7 +27,6 @@
 #include "set.h"
 #include "signal-util.h"
 #include "socket-util.h"
-#include "stdio-util.h"
 #include "string-util.h"
 #include "strv.h"
 #include "time-util.h"
index 4c2ee6f20fe8416cc0198829ee60d190034f31c2..c2119035bde2e7f6e8ec111b20cca96d474dc5b5 100644 (file)
@@ -2,6 +2,10 @@
 
 #include <sys/stat.h>
 
+#if HAVE_VMLINUX_H
+#include "bpf/userns-restrict/userns-restrict-skel.h"
+#endif
+
 #include "bpf-dlopen.h"
 #include "bpf-link.h"
 #include "fd-util.h"
index 0246b4600e6c9b88f7bdaa584a91ee2289fb66fc..21a81feaff4e5aa9fe22f9f3b295aeae8f3a46d9 100644 (file)
@@ -3,11 +3,7 @@
 
 #include "shared-forward.h"
 
-#if HAVE_VMLINUX_H
-#include "bpf/userns-restrict/userns-restrict-skel.h"
-#else
 struct userns_restrict_bpf;
-#endif
 
 int userns_restrict_install(bool pin, struct userns_restrict_bpf **ret);
 struct userns_restrict_bpf *userns_restrict_bpf_free(struct userns_restrict_bpf *obj);
index 7e68525ba016999acbf4962261bfc14e4d355338..7ea69c0c4bb43d336c7a020a82605b668a50ff46 100644 (file)
@@ -6,6 +6,7 @@
 #include "alloc-util.h"
 #include "cgroup-setup.h"
 #include "cgroup-util.h"
+#include "errno-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "oomd-util.h"
index 4f8f725864e9956bc26c764ea25cb2dd16366dba..5cff12b3a51e8f37d71e007c681e2ed5043e39b2 100644 (file)
@@ -14,7 +14,6 @@
 #include "log.h"
 #include "main-func.h"
 #include "mount-setup.h"
-#include "mount-util.h"
 #include "path-util.h"
 #include "process-util.h"
 #include "signal-util.h"
index c1ea2d1ebb43d26e3fa42080eb0870fb9c8faeef..75c0b9d8b9601d6460913f5627a45293ec642c72 100644 (file)
@@ -10,7 +10,7 @@
 #include "resolved-dns-delegate.h"
 #include "resolved-dns-delegate-bus.h"
 #include "resolved-dns-search-domain.h"
-#include "resolved-dns-server.h"
+#include "resolved-dns-server.h"        /* IWYU pragma: keep */
 #include "resolved-manager.h"
 #include "strv.h"
 
index d0b5d7340d6fa7b800902a186f7cc7afcdefb191..5052bb531e25d582e4d1ec3e348f994fae48f36c 100644 (file)
@@ -1,13 +1,12 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <resolv.h>
+#include <resolv.h>                     /* IWYU pragma: keep */
 #include <sys/stat.h>
 
 #include "alloc-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "fs-util.h"
-#include "label-util.h"
 #include "log.h"
 #include "ordered-set.h"
 #include "path-util.h"
index a952239d53d2ed3c8002dd6cc6fd1dbb1017c902..36c3c1ac31e187cbabb818f5eadce92fc690def6 100644 (file)
@@ -16,6 +16,7 @@
 #include "dns-packet.h"
 #include "dns-question.h"
 #include "dns-rr.h"
+#include "errno-util.h"
 #include "fd-util.h"
 #include "log.h"
 #include "path-util.h"
index 1dff9646cc90e91366496924fa5314b599ac0a3e..bcac9a9bb805bdd090c7aa4386e855a7a75c99a1 100644 (file)
@@ -1,13 +1,13 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/stat.h>
+#include <sys/syslog.h>
 
 #include "acl-util.h"
 #include "alloc-util.h"
 #include "errno-util.h"
 #include "extract-word.h"
 #include "fd-util.h"
-#include "log.h"
 #include "string-util.h"
 #include "strv.h"
 #include "user-util.h"
index 74a03817bda9cc99a5bca7dd2b8437540aec12c3..22e7d2d90d4442d25df9365364b19159f30f9693 100644 (file)
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#if HAVE_APPARMOR
+
 #include <syslog.h>
 
 #include "alloc-util.h"
@@ -8,7 +10,6 @@
 #include "log.h"
 #include "parse-util.h"
 
-#if HAVE_APPARMOR
 static void *libapparmor_dl = NULL;
 
 DLSYM_PROTOTYPE(aa_change_onexec) = NULL;
index 60f1332c26e82b1012ca40ecea9f459a55bfdd68..ae20b47d9ef122f9a3617cff5d19614e547b5b0e 100644 (file)
@@ -1,9 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include <sys/syslog.h>
+
 #include "sd-id128.h"
 
 #include "blkid-util.h"
-#include "log.h"
 #include "parse-util.h"
 #include "string-util.h"
 
index b3d77867a70d692e6b3895014bdac2acf5661398..23d68bd635af039b5b0509b29c7fad64c80b090a 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-bus.h"
+#include "sd-bus.h"     /* IWYU pragma: keep */
 
 #include "shared-forward.h"
 
index ed8e202a2eece4ccd0245d2a7e0294ccf0d9ecb7..0f644d444ac670d7349ddd411825f7ae1b9a5ef1 100644 (file)
@@ -2,7 +2,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <sys/mman.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
@@ -11,7 +10,6 @@
 #include "log.h"
 #include "memstream-util.h"
 #include "parse-util.h"
-#include "process-util.h"
 #include "sort-util.h"
 #include "string-util.h"
 #include "strv.h"
index 7748d2cc5333e26b3513b6d411a5418bf7082ca4..f88d1617b135145259254ed4f857e0c0db4d4a29 100644 (file)
@@ -27,7 +27,6 @@
 #include "path-util.h"
 #include "rm-rf.h"
 #include "selinux-util.h"
-#include "set.h"
 #include "signal-util.h"
 #include "stat-util.h"
 #include "stdio-util.h"
index 37dfb2c91a5f94de6cedbdee4583555f14f12321..d979de17768dc8934ad32bc73baa8e7e2989f6e3 100644 (file)
@@ -13,7 +13,7 @@
 #include "stdio-util.h"
 #include "string-table.h"
 #include "string-util.h"
-#include "unaligned.h"
+#include "unaligned.h"          /* IWYU pragma: keep */
 #include "virt.h"
 
 int set_dumpable(SuidDumpMode mode) {
index 3ed9958d72f1639b57d1721cabceb0d532ea8140..4e26b287c2c9e18713613c23b662c0911c0160d3 100644 (file)
@@ -7,7 +7,6 @@
 #include <sys/file.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
-#include <sys/sysmacros.h>
 #include <unistd.h>
 
 #include "sd-json.h"
 #include "hashmap.h"
 #include "hostname-setup.h"
 #include "id128-util.h"
-#include "initrd-util.h"
 #include "lock-util.h"
 #include "log.h"
 #include "loop-util.h"
-#include "mkdir.h"
 #include "namespace-util.h"
 #include "nsresource.h"
 #include "nulstr-util.h"
index 515ab67b060f84749afb524bf5eca2c8e0e6907a..a9f66927f90f0128fa8bfc204dc801d5b8f911a6 100644 (file)
@@ -4,7 +4,7 @@
 
 #include "alloc-util.h"
 #include "bitmap.h"
-#include "dns-answer.h"
+#include "dns-answer.h"                 /* IWYU pragma: keep */
 #include "dns-domain.h"
 #include "dns-packet.h"
 #include "dns-rr.h"
index ad9cbab74e132ad394f38ee3468aa2ceb2b5bbce..8a3a40cbecba7960515de5a1fcad924b69332aa4 100644 (file)
@@ -15,7 +15,7 @@
 #include "stat-util.h"
 #include "stdio-util.h"
 #include "string-util.h"
-#include "tpm2-util.h"
+#include "tpm2-util.h"                  /* IWYU pragma: keep */
 #include "utf8.h"
 
 #define EFI_TCG2_BOOT_HASH_ALG_SHA1   0x01
index 6613023754fddedeccbc69eb63d36ccce6b82db5..47f0bd52886e0ce562236ebcc13c889259051dd8 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "dlfcn-util.h"
 #include "idn-util.h"
-#include "log.h"
+#include "log.h"                /* IWYU pragma: keep */
 
 #if HAVE_LIBIDN || HAVE_LIBIDN2
 static void* idn_dl = NULL;
index 35083a266f1110edf9d66eb0fcca41a75f5724d4..d2714bd81c183d39e27525253003b7a50e808a3b 100644 (file)
@@ -3,7 +3,7 @@
 #include <syslog.h>
 
 #include "libarchive-util.h"
-#include "user-util.h"
+#include "user-util.h"                  /* IWYU pragma: keep */
 
 #if HAVE_LIBARCHIVE
 static void *libarchive_dl = NULL;
index 42c6feaabe7e42896bee18886a2c84d0cea6ab3f..594963ac6b05f17cae9e10c96447d23aab91fcf1 100644 (file)
@@ -7,7 +7,7 @@
 #include "errno-util.h"
 #include "libcrypt-util.h"
 #include "log.h"
-#include "random-util.h"
+#include "random-util.h"        /* IWYU pragma: keep */
 #include "string-util.h"
 #include "strv.h"
 
index 95a2ccbf18e317d1fd92b3e304300cdc1db09679..db8c3fe67dbd9ed829abe30e5d779bcb57c0f363 100644 (file)
@@ -2,7 +2,7 @@
 #pragma once
 
 #include "shared-forward.h"
-#include "static-destruct.h"
+#include "static-destruct.h"    /* IWYU pragma: keep */
 
 void main_prepare(int argc, char *argv[]);
 
index 71ecdffaa28fcbf9d2f5534bf9e5f842680e13b1..36473b10669ad510994126988153342f7e8bc76c 100644 (file)
@@ -3,7 +3,7 @@
 #include <sys/stat.h>
 
 #include "errno-util.h"
-#include "label-util.h"
+#include "label-util.h"         /* IWYU pragma: keep */
 #include "mkdir-label.h"
 #include "selinux-util.h"
 #include "smack-util.h"
index a161f5c8b03dde3d61a301991038fac56ce7146e..c24c763967f0e22cbbcb3e458fb889b713fbe24b 100644 (file)
@@ -1,15 +1,18 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "password-quality-util-passwdqc.h"
+
+#if HAVE_PASSWDQC
+
+#include <passwdqc.h>
+
 #include "alloc-util.h"
 #include "dlfcn-util.h"
 #include "errno-util.h"
 #include "log.h"
 #include "memory-util.h"
-#include "password-quality-util-passwdqc.h"
 #include "strv.h"
 
-#if HAVE_PASSWDQC
-
 static void *passwdqc_dl = NULL;
 
 DLSYM_PROTOTYPE(passwdqc_params_reset) = NULL;
index 7e94df431898a209921859e0d4537af8820c5918..e813829b63bececcca895ffefedc5a0c7f74089e 100644 (file)
@@ -4,8 +4,6 @@
 #include "shared-forward.h"
 
 #if HAVE_PASSWDQC
-#include <passwdqc.h>
-
 int suggest_passwords(void);
 int check_password_quality(const char *password, const char *old, const char *username, char **ret_error);
 #endif
index dfb618a4ba01b2e9ac5a817d52bd6352a6454737..33cd16227199a50a6b15273b56c730a3211a2867 100644 (file)
@@ -1,5 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "password-quality-util-pwquality.h"
+
+#if HAVE_PWQUALITY
+
+#include <pwquality.h>
 #include <stdio.h>
 #include <unistd.h>
 
@@ -8,12 +13,9 @@
 #include "errno-util.h"
 #include "log.h"
 #include "password-quality-util.h"
-#include "password-quality-util-pwquality.h"
 #include "string-util.h"
 #include "strv.h"
 
-#if HAVE_PWQUALITY
-
 static void *pwquality_dl = NULL;
 
 DLSYM_PROTOTYPE(pwquality_check) = NULL;
index aaede45c2f0deb00f6283058154016ea1d52a65e..829025a10d3d9f919c33307842c15cc21c95186d 100644 (file)
@@ -4,8 +4,6 @@
 #include "shared-forward.h"
 
 #if HAVE_PWQUALITY
-#include <pwquality.h>
-
 int suggest_passwords(void);
 int check_password_quality(const char *password, const char *old, const char *username, char **ret_error);
 #endif
index d95e2864c4472cd933765a9daf526740f0a92f4f..70adf36db291181051953bee8f9a35d3b2f7a89f 100644 (file)
@@ -14,7 +14,6 @@
 #include "errno-util.h"
 #include "fd-util.h"
 #include "log.h"
-#include "parse-util.h"
 #include "reread-partition-table.h"
 #include "set.h"
 #include "string-util.h"
index 783953aa6045c8a7b6654ddbfbb413cc4dbf8acb..bd682e6cbe9c336a02fa98693cfba3d2081875e2 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <stdio.h>
-
 #include "alloc-util.h"
 #include "extract-word.h"
 #include "securebits-util.h"
index 442fe83045f8781e0141d934a3946887bfcde9e4..7aa27a88b6b194676d24a52e1551ae8dde9b0558 100644 (file)
@@ -1,6 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <sched.h>
 #include <stdlib.h>
 #include <sys/mman.h>
 #include <unistd.h>
index 31b722829d67b782f0d4d84f26eeed7d88919188..885460d6fe7984af001a10b3b318873c04584fee 100644 (file)
@@ -4,14 +4,13 @@
 #include <unistd.h>
 
 #include "errno-list.h"
-#include "errno-util.h"
 #include "shared-forward.h"
 #include "log.h"
 #include "log-assert-critical.h"
-#include "static-destruct.h"
-#include "signal-util.h"
+#include "static-destruct.h"            /* IWYU pragma: keep*/
+#include "signal-util.h"                /* IWYU pragma: keep*/
 #include "stdio-util.h"
-#include "string-util.h"
+#include "string-util.h"                /* IWYU pragma: keep */
 
 static inline void log_set_assert_return_is_criticalp(bool *p) {
         log_set_assert_return_is_critical(*p);
index 50a8584c6e8891feef68b91ccf6040279b920204..a357016149ef3a4732b8ba7d2086cd19c615fe0a 100644 (file)
@@ -2,7 +2,7 @@
 #pragma once
 
 #include "shared-forward.h"
-#include "tpm2-util.h"
+#include "tpm2-util.h"          /* IWYU pragma: keep */
 
 /* Definitions as per "TCG PC Client Specific Platform Firmware Profile Specification"
  * (https://trustedcomputinggroup.org/resource/pc-client-specific-platform-firmware-profile-specification/),
index f185c5ab8b1bf076dd606576ed73e225b6875d49..e51c789a3e840f81269cc27a802a2139563561cb 100644 (file)
@@ -6,7 +6,6 @@
 #include "alloc-util.h"
 #include "ansi-color.h"
 #include "bitfield.h"
-#include "bootspec.h"
 #include "boot-entry.h"
 #include "constants.h"
 #include "creds-util.h"
@@ -14,7 +13,6 @@
 #include "dirent-util.h"
 #include "dlfcn-util.h"
 #include "efi-api.h"
-#include "errno-util.h"
 #include "extract-word.h"
 #include "fd-util.h"
 #include "fileio.h"
@@ -42,7 +40,6 @@
 #include "sync-util.h"
 #include "time-util.h"
 #include "tpm2-pcr.h"
-#include "tmpfile-util.h"
 #include "tpm2-util.h"
 #include "virt.h"
 
index b93112479a549349425e29e1358a48f52d3f6c50..390e1b414b8b16483968b43bf144b300f2078684 100644 (file)
@@ -1,8 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include "build.h"
 #include "varlink-idl-common.h"
-#include "varlink-io.systemd.Unit.h"
 
 /* CGroupContext */
 static SD_VARLINK_DEFINE_STRUCT_TYPE(
index d65a876e39f83cac7dee57226e7c30ac014b3d81..7fd39d67c8f856a94943e58947377eecdf590882 100644 (file)
@@ -3,7 +3,7 @@
   Copyright © 2010 ProFUSION embedded systems
 ***/
 
-#include <linux/major.h>
+#include <linux/major.h>        /* IWYU pragma: keep */
 #include <linux/raid/md_u.h>
 #include <sys/ioctl.h>
 
index 97ae7d119ce330881e356db86bc77663ecf3c00f..25882970ef62bacfe077878d49b9358d5488da0f 100644 (file)
@@ -26,7 +26,6 @@
 #include "detach-swap.h"
 #include "errno-util.h"
 #include "exec-util.h"
-#include "extract-word.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "format-util.h"
@@ -44,7 +43,6 @@
 #include "signal-util.h"
 #include "string-util.h"
 #include "switch-root.h"
-#include "sysctl-util.h"
 #include "terminal-util.h"
 #include "time-util.h"
 #include "umount.h"
index 61ac5c02409e07319937dd2c571263cce3fe10d9..852dabdb852d1388f0c3be163428d9158373fc9a 100644 (file)
@@ -7,7 +7,6 @@
 #include "alloc-util.h"
 #include "ansi-color.h"
 #include "build.h"
-#include "errno-util.h"
 #include "fd-util.h"
 #include "fs-util.h"
 #include "log.h"
index d761c7375a20f70898258e20f7ce33db0b6565a0..bc70509cab1425aa88952ac0e1434296707de8b9 100644 (file)
@@ -10,8 +10,6 @@
 #include "constants.h"
 #include "creds-util.h"
 #include "errno-util.h"
-#include "fd-util.h"
-#include "fileio.h"
 #include "glob-util.h"
 #include "hashmap.h"
 #include "log.h"
index cb21a16fce440c58d92a3b6b54ef846995629c83..d9c89eef746cde9b74ec6dec4c2cf55757dfdb41 100644 (file)
@@ -32,7 +32,7 @@
 #include "hashmap.h"
 #include "image-policy.h"
 #include "initrd-util.h"
-#include "label-util.h"
+#include "label-util.h"                 /* IWYU pragma: keep */
 #include "log.h"
 #include "loop-util.h"
 #include "main-func.h"
index 97137ef170c564a0f8c22b0295974aa23653436c..245ffdde0981cf634b39574195871c34cf3fc492 100644 (file)
@@ -17,7 +17,6 @@
 #include "errno-util.h"
 #include "exec-util.h"
 #include "exit-status.h"
-#include "extract-word.h"
 #include "format-util.h"
 #include "hexdecoct.h"
 #include "hostname-setup.h"
index 9996196426ce2ed60e302e8137d5f0d1e30debb5..d7fd7425b29d95b69a08e7a0d2f3fd3d7a56eaad 100644 (file)
@@ -5,7 +5,6 @@
 #include "alloc-util.h"
 #include "capability-list.h"
 #include "capability-util.h"
-#include "parse-util.h"
 #include "random-util.h"
 #include "string-util.h"
 #include "strv.h"
index 4b3a6f5247b94d4d114e2b045308b533017bbbc4..faeb1e1428b3f5b2f8a3c8a0215718d132152fd7 100644 (file)
@@ -5,6 +5,7 @@
 #include <unistd.h>
 
 #include "chown-recursive.h"
+#include "errno-util.h"
 #include "rm-rf.h"
 #include "string-util.h"
 #include "tests.h"
index f31b3613246a86de5fbf107cdf6988f02ffd1f38..72b99a905408c72fe35ea7c282a245440c1a9f54 100644 (file)
@@ -6,6 +6,7 @@
 #include <unistd.h>
 
 #include "clock-util.h"
+#include "errno-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "log.h"
index 58797b5926c53374617e15656861ba4dda00f0d1..e1bb7ae049378f2fd3102c552e2d3e8a2639cdcd 100644 (file)
@@ -10,6 +10,7 @@
 #include "argv-util.h"
 #include "chase.h"
 #include "copy.h"
+#include "errno-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "fs-util.h"
index 48987703f0cf14caea66dfb6565aa4176d205b03..5067cffcb39eba76839d0440d540bb9c59f6bcd4 100644 (file)
@@ -7,6 +7,7 @@
 #include <unistd.h>
 
 #include "dirent-util.h"
+#include "errno-util.h"
 #include "fs-util.h"
 #include "rm-rf.h"
 #include "string-util.h"
index e5258de81248f4969ff80eb534cdd29cb427a583..b07b123565f2edeafa15c11b0d0ccf00f44831b0 100644 (file)
@@ -7,6 +7,7 @@
 #include "alloc-util.h"
 #include "constants.h"
 #include "env-util.h"
+#include "errno-util.h"
 #include "exec-util.h"
 #include "fd-util.h"
 #include "fileio.h"
index b68086e3ae24505c774dbff5a9d3ea7e3db75bee..8283f01ff2e11322504d7b261e632556f3b75f14 100644 (file)
@@ -3,6 +3,7 @@
 #include <sys/file.h>
 #include <unistd.h>
 
+#include "errno-util.h"
 #include "fd-util.h"
 #include "lock-util.h"
 #include "rm-rf.h"
index 40ebf7e7446765c4be166ef298e263de21d5a660..5d352a7df07788c2c0244eeb8ae087c198882958 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "alloc-util.h"
 #include "capability-util.h"
+#include "errno-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "fs-util.h"
index 1da10e9ccc6e2303ff03d4864e3030288acc0f88..04426365f89c5559c672362ef748aea2eb876e74 100644 (file)
@@ -6,6 +6,7 @@
 #include <unistd.h>
 
 #include "alloc-util.h"
+#include "errno-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "fs-util.h"
index 804b63f8ee4fff3e3c86df0d3c680b324d031dc5..aacd776d7ffbba7d21c5d54fc13260c0ba1e7dab 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <net/if.h>
 
+#include "errno-util.h"
 #include "fd-util.h"
 #include "namespace-util.h"
 #include "nsresource.h"
index 2251cd4fff6300bfead5ff5ad04b91a5423fc1ad..e1a43b8b644a0bbad2fd074726189409b0338520 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "alloc-util.h"
 #include "argv-util.h"
+#include "errno-util.h"
 #include "exec-util.h"
 #include "fd-util.h"
 #include "path-util.h"
index 769d2a8d2f98e0cd26d1e490de443596c7a09274..c56e44d8efd61e77a3fbb6121799b5fa3fb63b31 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "blockdev-util.h"
 #include "capability-util.h"
+#include "errno-util.h"
 #include "fd-util.h"
 #include "loop-util.h"
 #include "memfd-util.h"
index bd66722456c35e353b6aa705f78aaa9200ac539d..ac1d5de3106470f2d330ee0eef4d508a4220beb8 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include "extract-word.h"
+#include "extract-word.h"       /* IWYU pragma: keep */
 #include "fd-util.h"
 #include "fileio.h"
 #include "log.h"
index cbaa29d5a9adf4ec987322e907071ce43482a37d..86a93c487f2e3af9410a99079e567bae7ae23bac 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "alloc-util.h"
 #include "errno-list.h"
+#include "errno-util.h"
 #include "fd-util.h"
 #include "fs-util.h"
 #include "mount-util.h"
index 95ceb0e5ae2e87e8c87cb1debb8e9a0077669e0c..a70e5b342d5bf93088390754aa230e9bae6e62e0 100644 (file)
@@ -30,7 +30,6 @@
 #include "show-status.h"
 #include "socket.h"
 #include "socket-label.h"
-#include "socket-util.h"
 #include "swap.h"
 #include "test-tables.h"
 #include "tests.h"
index 358d578ccb0923a0af21ef44a68b702660c0e924..3ec8d0caffd4fb617fb06fcd19c416151afc4d35 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "alloc-util.h"
 #include "ansi-color.h"
+#include "errno-util.h"
 #include "fd-util.h"
 #include "path-util.h"
 #include "process-util.h"
index 9a80f8e76796e890206b11c01457198fd8a43e19..6f9fe048705ab87e614690b05344a094d9a43cb4 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "sd-id128.h"
 
+#include "errno-util.h"
 #include "tests.h"
 
 TEST(ASSERT) {
index e3fe38f6caca7a7388e21d101dbc588582452c93..20e1c689dbf46688cbcc227e9e7ce911e1c150fb 100644 (file)
@@ -8,8 +8,8 @@
 #include "sd-varlink-idl.h"
 
 #include "bootspec.h"
-#include "dissect-image.h"
 #include "fd-util.h"
+#include "gpt.h"
 #include "json-util.h"
 #include "network-util.h"
 #include "pretty-print.h"
index 1c8667ec02e4b2cd3c8633e65780e800f49611b1..eeb0d8a8afc807db2322b7c656145c1a5a4845a6 100644 (file)
@@ -5,6 +5,7 @@
 #include <unistd.h>
 
 #include "alloc-util.h"
+#include "errno-util.h"
 #include "fd-util.h"
 #include "fs-util.h"
 #include "nulstr-util.h"
index 0e8e705a500d0769adc4a49e9a1a39dc408f8183..b2d6c0718cfbbd8cace8cc8d85b637019f049e40 100644 (file)
@@ -16,7 +16,6 @@
 #include "bus-print-properties.h"
 #include "bus-util.h"
 #include "constants.h"
-#include "env-util.h"
 #include "format-table.h"
 #include "in-addr-util.h"
 #include "log.h"
index ac1b91909ebfd827f449dfa4084c85012a516cf6..d33a41b893874116f61e7682a605cebb1de3c68a 100644 (file)
@@ -9,7 +9,6 @@
 #include "build.h"
 #include "conf-files.h"
 #include "constants.h"
-#include "creds-util.h"
 #include "errno-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "mkdir.h"
 #include "parse-util.h"
 #include "pretty-print.h"
-#include "recurse-dir.h"
 #include "set.h"
 #include "string-util.h"
 #include "strv.h"
-#include "terminal-util.h"
-#include "time-util.h"
 #include "tmpfile-util.h"
 #include "tpm2-util.h"
 
index 543ad9be06c804b4206315202d596ce6d35dd26c..76369f69068b3f48cdfb702566ad8cc0eef5aa13 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "alloc-util.h"
 #include "architecture.h"
-#include "chase.h"
+#include "chase.h"                      /* IWYU pragma: keep */
 #include "conf-files.h"
 #include "conf-parser.h"
 #include "confidential-virt.h"
index 5c6663b16e1d532eb26be44613cccc9442da5a7b..48c04aca5a597189fe69c3aa51eb41e7350776af 100644 (file)
@@ -15,7 +15,6 @@
 #include "extract-word.h"
 #include "log.h"
 #include "path-util.h"
-#include "stat-util.h"
 #include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
index 2ed0762de20388c10cd37dfbeda40465196520df..5f114b168b436c6d7a0dc4236c188465c700f5c6 100644 (file)
@@ -15,7 +15,6 @@
 #include "stat-util.h"
 #include "string-table.h"
 #include "string-util.h"
-#include "strv.h"
 #include "vpick.h"
 
 typedef enum {