diff --git a/src/basic/forward.h b/src/basic/forward.h index df3bdee233..5ca540ae01 100644 --- a/src/basic/forward.h +++ b/src/basic/forward.h @@ -6,6 +6,7 @@ #include /* IWYU pragma: export */ #include /* IWYU pragma: export */ #include /* IWYU pragma: export */ +#include /* IWYU pragma: export */ #include /* IWYU pragma: export */ #include /* IWYU pragma: export */ #include /* IWYU pragma: export */ diff --git a/src/basic/include/net/if.h b/src/basic/include/net/if.h index ba2948ae5c..1914b596e3 100644 --- a/src/basic/include/net/if.h +++ b/src/basic/include/net/if.h @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once +#include #include /* IWYU pragma: export */ #define IF_NAMESIZE 16 diff --git a/src/core/selinux-setup.c b/src/core/selinux-setup.c index a24af6d1c2..8e87b1be28 100644 --- a/src/core/selinux-setup.c +++ b/src/core/selinux-setup.c @@ -2,10 +2,6 @@ #include -#if HAVE_SELINUX -#include -#endif - #include "sd-messages.h" #include "errno-util.h" diff --git a/src/home/homed-home.c b/src/home/homed-home.c index 244e10166d..38da41332b 100644 --- a/src/home/homed-home.c +++ b/src/home/homed-home.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include -#include #include #include "sd-bus.h" diff --git a/src/home/homed-manager.c b/src/home/homed-manager.c index 511bc81707..5c0ad7625f 100644 --- a/src/home/homed-manager.c +++ b/src/home/homed-manager.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include "sd-bus.h" diff --git a/src/home/homework-quota.c b/src/home/homework-quota.c index 5d256c5dcd..f8affe58ed 100644 --- a/src/home/homework-quota.c +++ b/src/home/homework-quota.c @@ -1,5 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include #include "btrfs-util.h" #include "errno-util.h" diff --git a/src/journal/journald-sync.c b/src/journal/journald-sync.c index b22cb54b12..4722cfa9a3 100644 --- a/src/journal/journald-sync.c +++ b/src/journal/journald-sync.c @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include +#include #include -#include #include "sd-varlink.h" diff --git a/src/shared/cryptsetup-util.c b/src/shared/cryptsetup-util.c index e45e8431bc..b8281679dc 100644 --- a/src/shared/cryptsetup-util.c +++ b/src/shared/cryptsetup-util.c @@ -54,6 +54,12 @@ DLSYM_PROTOTYPE(crypt_token_json_get) = NULL; DLSYM_PROTOTYPE(crypt_token_json_set) = NULL; #if HAVE_CRYPT_TOKEN_MAX DLSYM_PROTOTYPE(crypt_token_max) = NULL; +#else +int crypt_token_max(_unused_ const char *type) { + assert(streq(type, CRYPT_LUKS2)); + + return 32; +} #endif #if HAVE_CRYPT_TOKEN_SET_EXTERNAL_PATH DLSYM_PROTOTYPE(crypt_token_set_external_path) = NULL; diff --git a/src/shared/cryptsetup-util.h b/src/shared/cryptsetup-util.h index 6ecc8f601f..df897c208f 100644 --- a/src/shared/cryptsetup-util.h +++ b/src/shared/cryptsetup-util.h @@ -56,11 +56,7 @@ extern DLSYM_PROTOTYPE(crypt_token_json_set); extern DLSYM_PROTOTYPE(crypt_token_max); #else /* As a fallback, use the same hard-coded value libcryptsetup uses internally. */ -static inline int crypt_token_max(_unused_ const char *type) { - assert(streq(type, CRYPT_LUKS2)); - - return 32; -} +int crypt_token_max(_unused_ const char *type); #define sym_crypt_token_max(type) crypt_token_max(type) #endif #if HAVE_CRYPT_TOKEN_SET_EXTERNAL_PATH diff --git a/src/shared/libcrypt-util.c b/src/shared/libcrypt-util.c index 7c48b5e0d3..aa41cd4458 100644 --- a/src/shared/libcrypt-util.c +++ b/src/shared/libcrypt-util.c @@ -21,6 +21,7 @@ #include "errno-util.h" #include "libcrypt-util.h" #include "log.h" +#include "random-util.h" #include "string-util.h" #include "strv.h" diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c index b0581162ab..8a69e9692b 100644 --- a/src/shared/utmp-wtmp.c +++ b/src/shared/utmp-wtmp.c @@ -104,7 +104,7 @@ static int write_entry_wtmp(const struct utmpx *store) { * simply appended to the end; i.e. basically a log. */ errno = 0; - updwtmpx(_PATH_WTMPX, store); + updwtmpx(WTMPX_FILE, store); if (errno == ENOENT) { /* If utmp/wtmp have been disabled, that's a good thing, hence ignore the error. */ log_debug_errno(errno, "Not writing wtmp: %m");