diff options
82 files changed, 124 insertions, 22 deletions
diff --git a/src/basic/af-list.h b/src/basic/af-list.h index 65656022cc..1684bc6a0f 100644 --- a/src/basic/af-list.h +++ b/src/basic/af-list.h @@ -20,6 +20,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <sys/socket.h> + #include "string-util.h" const char *af_to_name(int id); diff --git a/src/basic/calendarspec.c b/src/basic/calendarspec.c index d1ba1681fb..fd78022773 100644 --- a/src/basic/calendarspec.c +++ b/src/basic/calendarspec.c @@ -35,6 +35,7 @@ #include "fileio.h" #include "macro.h" #include "parse-util.h" +#include "process-util.h" #include "string-util.h" #include "time-util.h" diff --git a/src/basic/errno-list.c b/src/basic/errno-list.c index d8eedfc0ad..7eb28b8fd1 100644 --- a/src/basic/errno-list.c +++ b/src/basic/errno-list.c @@ -18,6 +18,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> #include <string.h> #include "errno-list.h" diff --git a/src/basic/ether-addr-util.c b/src/basic/ether-addr-util.c index bbe8bf0006..bfbd1a4931 100644 --- a/src/basic/ether-addr-util.c +++ b/src/basic/ether-addr-util.c @@ -18,6 +18,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> #include <net/ethernet.h> #include <stdio.h> #include <sys/types.h> diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c index 16f97893c9..57d22b8abb 100644 --- a/src/basic/fs-util.c +++ b/src/basic/fs-util.c @@ -39,6 +39,7 @@ #include "mkdir.h" #include "parse-util.h" #include "path-util.h" +#include "process-util.h" #include "stat-util.h" #include "stdio-util.h" #include "string-util.h" diff --git a/src/basic/gunicode.c b/src/basic/gunicode.c index e6ac0545a4..8aff4a0fc5 100644 --- a/src/basic/gunicode.c +++ b/src/basic/gunicode.c @@ -4,8 +4,6 @@ * Copyright 2000, 2005 Red Hat, Inc. */ -#include <stdlib.h> - #include "gunicode.h" #define unichar uint32_t diff --git a/src/basic/hash-funcs.c b/src/basic/hash-funcs.c index e69f81558d..5267758769 100644 --- a/src/basic/hash-funcs.c +++ b/src/basic/hash-funcs.c @@ -19,6 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <string.h> + #include "hash-funcs.h" void string_hash_func(const void *p, struct siphash *state) { diff --git a/src/basic/hostname-util.h b/src/basic/hostname-util.h index d837d6f28c..edae52e3db 100644 --- a/src/basic/hostname-util.h +++ b/src/basic/hostname-util.h @@ -21,6 +21,7 @@ ***/ #include <stdbool.h> +#include <stdio.h> #include "macro.h" diff --git a/src/basic/journal-importer.c b/src/basic/journal-importer.c index 6942c370cb..11054589e3 100644 --- a/src/basic/journal-importer.c +++ b/src/basic/journal-importer.c @@ -18,6 +18,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> #include <unistd.h> #include "alloc-util.h" diff --git a/src/basic/log.c b/src/basic/log.c index 20d9588e2f..b1b4486627 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -1239,7 +1239,6 @@ void log_received_signal(int level, const struct signalfd_siginfo *si) { log_full(level, "Received SIG%s.", signal_to_string(si->ssi_signo)); - } int log_syntax_internal( @@ -1300,3 +1299,10 @@ void log_set_always_reopen_console(bool b) { void log_set_open_when_needed(bool b) { open_when_needed = b; } + +int log_emergency_level(void) { + /* Returns the log level to use for log_emergency() logging. We use LOG_EMERG only when we are PID 1, as only + * then the system of the whole system is obviously affected. */ + + return getpid_cached() == 1 ? LOG_EMERG : LOG_ERR; +} diff --git a/src/basic/log.h b/src/basic/log.h index 28300312f6..a731c75153 100644 --- a/src/basic/log.h +++ b/src/basic/log.h @@ -20,18 +20,16 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <errno.h> #include <stdarg.h> #include <stdbool.h> #include <stdlib.h> -#include <sys/signalfd.h> -#include <sys/socket.h> #include <syslog.h> -#include "sd-id128.h" - #include "macro.h" -#include "process-util.h" + +/* Some structures we reference but don't want to pull in headers for */ +struct iovec; +struct signalfd_siginfo; typedef enum LogRealm { LOG_REALM_SYSTEMD, @@ -194,7 +192,7 @@ int log_struct_iovec_internal( const char *file, int line, const char *func, - const struct iovec input_iovec[], + const struct iovec *input_iovec, size_t n_input_iovec); /* This modifies the buffer passed! */ @@ -252,13 +250,15 @@ void log_assert_failed_return_realm( #define log_full(level, ...) log_full_errno((level), 0, __VA_ARGS__) +int log_emergency_level(void); + /* Normal logging */ #define log_debug(...) log_full(LOG_DEBUG, __VA_ARGS__) #define log_info(...) log_full(LOG_INFO, __VA_ARGS__) #define log_notice(...) log_full(LOG_NOTICE, __VA_ARGS__) #define log_warning(...) log_full(LOG_WARNING, __VA_ARGS__) #define log_error(...) log_full(LOG_ERR, __VA_ARGS__) -#define log_emergency(...) log_full(getpid_cached() == 1 ? LOG_EMERG : LOG_ERR, __VA_ARGS__) +#define log_emergency(...) log_full(log_emergency_level(), __VA_ARGS__) /* Logging triggered by an errno-like error */ #define log_debug_errno(error, ...) log_full_errno(LOG_DEBUG, error, __VA_ARGS__) @@ -266,7 +266,7 @@ void log_assert_failed_return_realm( #define log_notice_errno(error, ...) log_full_errno(LOG_NOTICE, error, __VA_ARGS__) #define log_warning_errno(error, ...) log_full_errno(LOG_WARNING, error, __VA_ARGS__) #define log_error_errno(error, ...) log_full_errno(LOG_ERR, error, __VA_ARGS__) -#define log_emergency_errno(error, ...) log_full_errno(getpid_cached() == 1 ? LOG_EMERG : LOG_ERR, error, __VA_ARGS__) +#define log_emergency_errno(error, ...) log_full_errno(log_emergency_level(), error, __VA_ARGS__) #ifdef LOG_TRACE # define log_trace(...) log_debug(__VA_ARGS__) diff --git a/src/basic/process-util.h b/src/basic/process-util.h index fdb1790b2e..267888a625 100644 --- a/src/basic/process-util.h +++ b/src/basic/process-util.h @@ -21,6 +21,7 @@ ***/ #include <alloca.h> +#include <errno.h> #include <sched.h> #include <signal.h> #include <stdbool.h> diff --git a/src/basic/random-util.c b/src/basic/random-util.c index 1bc8000896..7457815fa2 100644 --- a/src/basic/random-util.c +++ b/src/basic/random-util.c @@ -21,11 +21,12 @@ #include <elf.h> #include <errno.h> #include <fcntl.h> +#include <linux/random.h> #include <stdbool.h> +#include <stdint.h> #include <stdlib.h> +#include <string.h> #include <sys/time.h> -#include <linux/random.h> -#include <stdint.h> #if HAVE_SYS_AUXV_H # include <sys/auxv.h> diff --git a/src/basic/securebits-util.c b/src/basic/securebits-util.c index b5f6418a6c..441d386f9e 100644 --- a/src/basic/securebits-util.c +++ b/src/basic/securebits-util.c @@ -19,6 +19,7 @@ ***/ #include <errno.h> +#include <stdio.h> #include "alloc-util.h" #include "extract-word.h" diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c index d6371f833d..2c70cade14 100644 --- a/src/basic/socket-util.c +++ b/src/basic/socket-util.c @@ -41,6 +41,7 @@ #include "missing.h" #include "parse-util.h" #include "path-util.h" +#include "process-util.h" #include "socket-util.h" #include "string-table.h" #include "string-util.h" diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c index 96fc8b3787..3a54103f1b 100644 --- a/src/basic/stat-util.c +++ b/src/basic/stat-util.c @@ -21,10 +21,11 @@ #include <dirent.h> #include <errno.h> #include <fcntl.h> -#include <sys/stat.h> -#include <sys/types.h> #include <linux/magic.h> +#include <sched.h> +#include <sys/stat.h> #include <sys/statvfs.h> +#include <sys/types.h> #include <unistd.h> #include "dirent-util.h" diff --git a/src/basic/time-util.c b/src/basic/time-util.c index cbb5285018..4a341e208f 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -38,6 +38,7 @@ #include "macro.h" #include "parse-util.h" #include "path-util.h" +#include "process-util.h" #include "string-util.h" #include "strv.h" #include "time-util.h" diff --git a/src/basic/verbs.c b/src/basic/verbs.c index 556acdcaa3..47644670da 100644 --- a/src/basic/verbs.c +++ b/src/basic/verbs.c @@ -22,10 +22,12 @@ #include <getopt.h> #include <stdbool.h> #include <stddef.h> +#include <string.h> #include "env-util.h" #include "log.h" #include "macro.h" +#include "process-util.h" #include "string-util.h" #include "verbs.h" #include "virt.h" diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index 48fdf97c7f..1cc77e29f9 100644 --- a/src/boot/bootctl.c +++ b/src/boot/bootctl.c @@ -36,6 +36,8 @@ #include <sys/statfs.h> #include <unistd.h> +#include "sd-id128.h" + #include "alloc-util.h" #include "blkid-util.h" #include "bootspec.h" diff --git a/src/core/dbus.c b/src/core/dbus.c index 5e8a299983..258f4c6379 100644 --- a/src/core/dbus.c +++ b/src/core/dbus.c @@ -41,6 +41,7 @@ #include "log.h" #include "missing.h" #include "mkdir.h" +#include "process-util.h" #include "selinux-access.h" #include "special.h" #include "string-util.h" diff --git a/src/core/locale-setup.c b/src/core/locale-setup.c index 6240a83197..0c43cf2418 100644 --- a/src/core/locale-setup.c +++ b/src/core/locale-setup.c @@ -20,6 +20,7 @@ #include <errno.h> #include <stdlib.h> +#include <string.h> #include "env-util.h" #include "fileio.h" diff --git a/src/core/umount.c b/src/core/umount.c index 6b0100fb44..731436af27 100644 --- a/src/core/umount.c +++ b/src/core/umount.c @@ -38,6 +38,7 @@ #include "mount-setup.h" #include "mount-util.h" #include "path-util.h" +#include "process-util.h" #include "signal-util.h" #include "string-util.h" #include "udev-util.h" diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c index 207ddeb70f..1dbceb8803 100644 --- a/src/firstboot/firstboot.c +++ b/src/firstboot/firstboot.c @@ -23,6 +23,8 @@ #include <shadow.h> #include <unistd.h> +#include "sd-id128.h" + #include "alloc-util.h" #include "ask-password-api.h" #include "copy.h" diff --git a/src/import/export.c b/src/import/export.c index 753d1399f5..0f32b90051 100644 --- a/src/import/export.c +++ b/src/import/export.c @@ -21,6 +21,7 @@ #include <getopt.h> #include "sd-event.h" +#include "sd-id128.h" #include "alloc-util.h" #include "export-raw.h" diff --git a/src/import/import-common.c b/src/import/import-common.c index aa7ab974d2..c24a0b0c86 100644 --- a/src/import/import-common.c +++ b/src/import/import-common.c @@ -27,6 +27,7 @@ #include "capability-util.h" #include "fd-util.h" #include "import-common.h" +#include "process-util.h" #include "signal-util.h" #include "util.h" diff --git a/src/import/import.c b/src/import/import.c index cc454ee15b..454e64e3cb 100644 --- a/src/import/import.c +++ b/src/import/import.c @@ -21,6 +21,7 @@ #include <getopt.h> #include "sd-event.h" +#include "sd-id128.h" #include "alloc-util.h" #include "fd-util.h" diff --git a/src/import/pull.c b/src/import/pull.c index 46e0fd5acb..325f7e3d50 100644 --- a/src/import/pull.c +++ b/src/import/pull.c @@ -21,6 +21,7 @@ #include <getopt.h> #include "sd-event.h" +#include "sd-id128.h" #include "alloc-util.h" #include "hostname-util.h" diff --git a/src/initctl/initctl.c b/src/initctl/initctl.c index 5488999727..c1af13d15b 100644 --- a/src/initctl/initctl.c +++ b/src/initctl/initctl.c @@ -38,6 +38,7 @@ #include "log.h" #include "special.h" #include "util.h" +#include "process-util.h" #define SERVER_FD_MAX 16 #define TIMEOUT_MSEC ((int) (DEFAULT_EXIT_USEC/USEC_PER_MSEC)) diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c index a8755751ee..66d5369a54 100644 --- a/src/journal-remote/journal-remote.c +++ b/src/journal-remote/journal-remote.c @@ -43,6 +43,7 @@ #include "journald-native.h" #include "macro.h" #include "parse-util.h" +#include "process-util.h" #include "signal-util.h" #include "socket-util.h" #include "stat-util.h" diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c index 7566543c1a..0b74ca98a7 100644 --- a/src/journal-remote/journal-upload.c +++ b/src/journal-remote/journal-upload.c @@ -37,6 +37,7 @@ #include "log.h" #include "mkdir.h" #include "parse-util.h" +#include "process-util.h" #include "sigbus.h" #include "signal-util.h" #include "string-util.h" diff --git a/src/journal/journald.c b/src/journal/journald.c index 6d670e2f4f..2724a2df95 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -28,6 +28,7 @@ #include "journald-kmsg.h" #include "journald-server.h" #include "journald-syslog.h" +#include "process-util.h" #include "sigbus.h" int main(int argc, char *argv[]) { diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 8a1b161d8f..6da7bf8e81 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -48,6 +48,7 @@ #include "lookup3.h" #include "missing.h" #include "path-util.h" +#include "process-util.h" #include "replace-var.h" #include "stat-util.h" #include "stdio-util.h" diff --git a/src/journal/test-compress-benchmark.c b/src/journal/test-compress-benchmark.c index 409a876054..1f77197549 100644 --- a/src/journal/test-compress-benchmark.c +++ b/src/journal/test-compress-benchmark.c @@ -23,6 +23,7 @@ #include "env-util.h" #include "macro.h" #include "parse-util.h" +#include "process-util.h" #include "random-util.h" #include "string-util.h" #include "util.h" diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c index c20e9fca35..94386e4860 100644 --- a/src/libsystemd-network/network-internal.c +++ b/src/libsystemd-network/network-internal.c @@ -22,6 +22,7 @@ #include <linux/if.h> #include <netinet/ether.h> +#include "sd-id128.h" #include "sd-ndisc.h" #include "alloc-util.h" diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c index 63fb355e85..907b72391b 100644 --- a/src/libsystemd-network/sd-dhcp-server.c +++ b/src/libsystemd-network/sd-dhcp-server.c @@ -28,6 +28,7 @@ #include "dhcp-server-internal.h" #include "fd-util.h" #include "in-addr-util.h" +#include "sd-id128.h" #include "siphash24.h" #include "string-util.h" #include "unaligned.h" diff --git a/src/libsystemd-network/sd-ipv4ll.c b/src/libsystemd-network/sd-ipv4ll.c index 23e2f5211d..f3d09eb30a 100644 --- a/src/libsystemd-network/sd-ipv4ll.c +++ b/src/libsystemd-network/sd-ipv4ll.c @@ -25,6 +25,7 @@ #include <stdlib.h> #include <string.h> +#include "sd-id128.h" #include "sd-ipv4acd.h" #include "sd-ipv4ll.h" diff --git a/src/libsystemd-network/test-lldp.c b/src/libsystemd-network/test-lldp.c index c62689373f..b91797cb66 100644 --- a/src/libsystemd-network/test-lldp.c +++ b/src/libsystemd-network/test-lldp.c @@ -20,6 +20,7 @@ ***/ #include <arpa/inet.h> +#include <errno.h> #include <net/ethernet.h> #include <stdio.h> #include <string.h> diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c index c6e3bf99fb..da4ed7b127 100644 --- a/src/libsystemd/sd-bus/bus-control.c +++ b/src/libsystemd/sd-bus/bus-control.c @@ -33,6 +33,7 @@ #include "bus-message.h" #include "bus-util.h" #include "capability-util.h" +#include "process-util.h" #include "stdio-util.h" #include "string-util.h" #include "strv.h" diff --git a/src/libsystemd/sd-bus/bus-gvariant.c b/src/libsystemd/sd-bus/bus-gvariant.c index 6a990a02c0..e6ab984d1f 100644 --- a/src/libsystemd/sd-bus/bus-gvariant.c +++ b/src/libsystemd/sd-bus/bus-gvariant.c @@ -18,6 +18,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> +#include <string.h> + +#include "sd-bus.h" + #include "bus-gvariant.h" #include "bus-signature.h" #include "bus-type.h" diff --git a/src/libsystemd/sd-bus/bus-signature.c b/src/libsystemd/sd-bus/bus-signature.c index d16461f4ae..f3cd9bd0fa 100644 --- a/src/libsystemd/sd-bus/bus-signature.c +++ b/src/libsystemd/sd-bus/bus-signature.c @@ -20,6 +20,8 @@ #include <util.h> +#include "sd-bus.h" + #include "bus-signature.h" #include "bus-type.h" diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c index 61539313bc..cc52bfdd07 100644 --- a/src/libsystemd/sd-bus/bus-socket.c +++ b/src/libsystemd/sd-bus/bus-socket.c @@ -38,6 +38,7 @@ #include "macro.h" #include "missing.h" #include "path-util.h" +#include "process-util.h" #include "selinux-util.h" #include "signal-util.h" #include "stdio-util.h" diff --git a/src/libsystemd/sd-bus/bus-type.c b/src/libsystemd/sd-bus/bus-type.c index fe486f441d..980b35d8ea 100644 --- a/src/libsystemd/sd-bus/bus-type.c +++ b/src/libsystemd/sd-bus/bus-type.c @@ -18,6 +18,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> + +#include "sd-bus.h" + #include "bus-type.h" bool bus_type_is_valid(char c) { diff --git a/src/libsystemd/sd-bus/bus-type.h b/src/libsystemd/sd-bus/bus-type.h index ae272b1e6a..834f09777a 100644 --- a/src/libsystemd/sd-bus/bus-type.h +++ b/src/libsystemd/sd-bus/bus-type.h @@ -22,8 +22,6 @@ #include <stdbool.h> -#include "sd-bus.h" - #include "macro.h" bool bus_type_is_valid(char c) _const_; diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c index 8c8853c7ee..e723960e9f 100644 --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -50,6 +50,7 @@ #include "macro.h" #include "missing.h" #include "parse-util.h" +#include "process-util.h" #include "string-util.h" #include "strv.h" #include "util.h" diff --git a/src/libsystemd/sd-bus/test-bus-track.c b/src/libsystemd/sd-bus/test-bus-track.c index 320e8347f4..94c9d09de3 100644 --- a/src/libsystemd/sd-bus/test-bus-track.c +++ b/src/libsystemd/sd-bus/test-bus-track.c @@ -18,6 +18,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> +#include <sys/socket.h> + #include "sd-bus.h" #include "macro.h" diff --git a/src/libsystemd/sd-daemon/sd-daemon.c b/src/libsystemd/sd-daemon/sd-daemon.c index ba383e0b3b..93721a5cf4 100644 --- a/src/libsystemd/sd-daemon/sd-daemon.c +++ b/src/libsystemd/sd-daemon/sd-daemon.c @@ -39,6 +39,7 @@ #include "fs-util.h" #include "parse-util.h" #include "path-util.h" +#include "process-util.h" #include "socket-util.h" #include "strv.h" #include "util.h" diff --git a/src/libsystemd/sd-event/test-event.c b/src/libsystemd/sd-event/test-event.c index 87a0c8522d..9873ae4a58 100644 --- a/src/libsystemd/sd-event/test-event.c +++ b/src/libsystemd/sd-event/test-event.c @@ -27,6 +27,7 @@ #include "macro.h" #include "signal-util.h" #include "util.h" +#include "process-util.h" static int prepare_handler(sd_event_source *s, void *userdata) { log_info("preparing %c", PTR_TO_INT(userdata)); diff --git a/src/libsystemd/sd-id128/id128-util.c b/src/libsystemd/sd-id128/id128-util.c index 5541e8d47e..a6e38578b1 100644 --- a/src/libsystemd/sd-id128/id128-util.c +++ b/src/libsystemd/sd-id128/id128-util.c @@ -18,6 +18,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> #include <fcntl.h> #include <unistd.h> diff --git a/src/libsystemd/sd-netlink/sd-netlink.c b/src/libsystemd/sd-netlink/sd-netlink.c index d3c4e7130a..116e287bb6 100644 --- a/src/libsystemd/sd-netlink/sd-netlink.c +++ b/src/libsystemd/sd-netlink/sd-netlink.c @@ -30,6 +30,7 @@ #include "missing.h" #include "netlink-internal.h" #include "netlink-util.h" +#include "process-util.h" #include "socket-util.h" #include "util.h" diff --git a/src/libsystemd/sd-resolve/sd-resolve.c b/src/libsystemd/sd-resolve/sd-resolve.c index 6ed50b4e4a..787642a7fb 100644 --- a/src/libsystemd/sd-resolve/sd-resolve.c +++ b/src/libsystemd/sd-resolve/sd-resolve.c @@ -40,6 +40,7 @@ #include "missing.h" #include "socket-util.h" #include "util.h" +#include "process-util.h" #define WORKERS_MIN 1U #define WORKERS_MAX 16U diff --git a/src/login/logind-core.c b/src/login/logind-core.c index adeba746f5..e338682f41 100644 --- a/src/login/logind-core.c +++ b/src/login/logind-core.c @@ -31,6 +31,7 @@ #include "fd-util.h" #include "logind.h" #include "parse-util.h" +#include "process-util.h" #include "strv.h" #include "terminal-util.h" #include "udev-util.h" diff --git a/src/login/logind.c b/src/login/logind.c index cbaaa48e5a..d15d4cec5b 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -29,17 +29,18 @@ #include "alloc-util.h" #include "bus-error.h" #include "bus-util.h" +#include "cgroup-util.h" #include "conf-parser.h" #include "def.h" #include "dirent-util.h" #include "fd-util.h" #include "format-util.h" #include "logind.h" +#include "process-util.h" #include "selinux-util.h" #include "signal-util.h" #include "strv.h" #include "udev-util.h" -#include "cgroup-util.h" static void manager_free(Manager *m); diff --git a/src/network/netdev/tuntap.c b/src/network/netdev/tuntap.c index 4597a7feeb..4fc9b610af 100644 --- a/src/network/netdev/tuntap.c +++ b/src/network/netdev/tuntap.c @@ -18,6 +18,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> #include <fcntl.h> #include <linux/if_tun.h> #include <net/if.h> diff --git a/src/network/netdev/veth.c b/src/network/netdev/veth.c index 9220b3200f..2a2f50e345 100644 --- a/src/network/netdev/veth.c +++ b/src/network/netdev/veth.c @@ -18,8 +18,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <net/if.h> +#include <errno.h> #include <linux/veth.h> +#include <net/if.h> #include "sd-netlink.h" diff --git a/src/network/netdev/vlan.c b/src/network/netdev/vlan.c index 3a0100d7e6..e7c0e7602a 100644 --- a/src/network/netdev/vlan.c +++ b/src/network/netdev/vlan.c @@ -18,6 +18,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> #include <linux/if_vlan.h> #include <net/if.h> diff --git a/src/nspawn/nspawn-settings.h b/src/nspawn/nspawn-settings.h index c0c5a153b0..10b8a63052 100644 --- a/src/nspawn/nspawn-settings.h +++ b/src/nspawn/nspawn-settings.h @@ -22,6 +22,8 @@ #include <stdio.h> +#include "sd-id128.h" + #include "macro.h" #include "nspawn-expose-ports.h" #include "nspawn-mount.h" diff --git a/src/nspawn/nspawn-setuid.c b/src/nspawn/nspawn-setuid.c index cb1be273f4..b08bcd988a 100644 --- a/src/nspawn/nspawn-setuid.c +++ b/src/nspawn/nspawn-setuid.c @@ -23,6 +23,7 @@ #include <unistd.h> #include "alloc-util.h" +#include "errno.h" #include "fd-util.h" #include "mkdir.h" #include "nspawn-setuid.h" diff --git a/src/partition/makefs.c b/src/partition/makefs.c index 2ed31ac7ab..a957967dfe 100644 --- a/src/partition/makefs.c +++ b/src/partition/makefs.c @@ -28,6 +28,7 @@ #include "alloc-util.h" #include "dissect-image.h" +#include "process-util.h" #include "signal-util.h" #include "string-util.h" diff --git a/src/resolve/dns-type.c b/src/resolve/dns-type.c index 347252a90f..0c366b5e8e 100644 --- a/src/resolve/dns-type.c +++ b/src/resolve/dns-type.c @@ -19,6 +19,7 @@ ***/ #include <sys/socket.h> +#include <errno.h> #include "dns-type.h" #include "parse-util.h" diff --git a/src/resolve/test-dns-packet.c b/src/resolve/test-dns-packet.c index 458c908fad..c1f118fecc 100644 --- a/src/resolve/test-dns-packet.c +++ b/src/resolve/test-dns-packet.c @@ -21,6 +21,8 @@ #include <net/if.h> #include <glob.h> +#include "sd-id128.h" + #include "alloc-util.h" #include "fileio.h" #include "glob-util.h" diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c index 4f255f620b..9c3bdd47de 100644 --- a/src/shared/bootspec.c +++ b/src/shared/bootspec.c @@ -20,6 +20,8 @@ #include <stdio.h> #include <linux/magic.h> +#include "sd-id128.h" + #include "alloc-util.h" #include "blkid-util.h" #include "bootspec.h" diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 35b2c56555..1f0579f548 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -22,6 +22,8 @@ #include <sys/prctl.h> #include <sys/wait.h> +#include "sd-id128.h" + #include "architecture.h" #include "ask-password-api.h" #include "blkid-util.h" diff --git a/src/shared/dissect-image.h b/src/shared/dissect-image.h index 53a1554a28..10e251ff09 100644 --- a/src/shared/dissect-image.h +++ b/src/shared/dissect-image.h @@ -22,6 +22,8 @@ #include <stdbool.h> +#include "sd-id128.h" + #include "macro.h" typedef struct DissectedImage DissectedImage; diff --git a/src/shared/loop-util.c b/src/shared/loop-util.c index 097de690e5..37b8479f88 100644 --- a/src/shared/loop-util.c +++ b/src/shared/loop-util.c @@ -18,6 +18,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> #include <fcntl.h> #include <linux/loop.h> #include <sys/ioctl.h> diff --git a/src/shared/test-tables.h b/src/shared/test-tables.h index 6b223b1ee5..dd8bf0b582 100644 --- a/src/shared/test-tables.h +++ b/src/shared/test-tables.h @@ -20,6 +20,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> typedef const char* (*lookup_t)(int); typedef int (*reverse_t)(const char*); diff --git a/src/shared/volatile-util.c b/src/shared/volatile-util.c index 85512d00af..c92ad0adc0 100644 --- a/src/shared/volatile-util.c +++ b/src/shared/volatile-util.c @@ -18,6 +18,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> + #include "alloc-util.h" #include "macro.h" #include "parse-util.h" diff --git a/src/test/test-cgroup.c b/src/test/test-cgroup.c index 2ae95db162..b2440fc3a9 100644 --- a/src/test/test-cgroup.c +++ b/src/test/test-cgroup.c @@ -23,6 +23,7 @@ #include "cgroup-util.h" #include "path-util.h" +#include "process-util.h" #include "string-util.h" #include "util.h" diff --git a/src/test/test-extract-word.c b/src/test/test-extract-word.c index 84ab083e87..3e7c197cfe 100644 --- a/src/test/test-extract-word.c +++ b/src/test/test-extract-word.c @@ -19,6 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> #include <stdlib.h> #include <string.h> diff --git a/src/test/test-hash.c b/src/test/test-hash.c index f3b4258d6b..0366727476 100644 --- a/src/test/test-hash.c +++ b/src/test/test-hash.c @@ -18,6 +18,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> #include <stdio.h> #include "alloc-util.h" diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c index 4f19cb406f..3e25a0bac8 100644 --- a/src/test/test-hexdecoct.c +++ b/src/test/test-hexdecoct.c @@ -18,6 +18,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> + #include "alloc-util.h" #include "hexdecoct.h" #include "macro.h" diff --git a/src/test/test-log.c b/src/test/test-log.c index 9468349cba..fd19899480 100644 --- a/src/test/test-log.c +++ b/src/test/test-log.c @@ -23,6 +23,7 @@ #include "format-util.h" #include "log.h" +#include "process-util.h" #include "util.h" assert_cc(LOG_REALM_REMOVE_LEVEL(LOG_REALM_PLUS_LEVEL(LOG_REALM_SYSTEMD, LOG_FTP | LOG_DEBUG)) diff --git a/src/test/test-ns.c b/src/test/test-ns.c index 76e2b38b17..87b4facb85 100644 --- a/src/test/test-ns.c +++ b/src/test/test-ns.c @@ -18,6 +18,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> #include <stdlib.h> #include <unistd.h> diff --git a/src/test/test-parse-util.c b/src/test/test-parse-util.c index 8259e133c3..9375002133 100644 --- a/src/test/test-parse-util.c +++ b/src/test/test-parse-util.c @@ -19,6 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> #include <locale.h> #include <math.h> diff --git a/src/test/test-signal-util.c b/src/test/test-signal-util.c index 13a1d2ba1f..f4b19ed69d 100644 --- a/src/test/test-signal-util.c +++ b/src/test/test-signal-util.c @@ -23,6 +23,7 @@ #include "macro.h" #include "signal-util.h" +#include "process-util.h" static void test_block_signals(void) { sigset_t ss; diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c index cc07dc3634..aed6db8423 100644 --- a/src/test/test-sizeof.c +++ b/src/test/test-sizeof.c @@ -19,6 +19,7 @@ ***/ #include <stdio.h> +#include <string.h> #include "time-util.h" diff --git a/src/test/test-socket-util.c b/src/test/test-socket-util.c index 5b1574e8ea..d1ab7486ed 100644 --- a/src/test/test-socket-util.c +++ b/src/test/test-socket-util.c @@ -28,6 +28,7 @@ #include "in-addr-util.h" #include "log.h" #include "macro.h" +#include "process-util.h" #include "socket-util.h" #include "string-util.h" #include "util.h" diff --git a/src/test/test-tmpfiles.c b/src/test/test-tmpfiles.c index c479eccb8b..8e57fe0461 100644 --- a/src/test/test-tmpfiles.c +++ b/src/test/test-tmpfiles.c @@ -29,6 +29,7 @@ #include "format-util.h" #include "fs-util.h" #include "log.h" +#include "process-util.h" #include "string-util.h" #include "util.h" diff --git a/src/test/test-util.c b/src/test/test-util.c index 2124511bf0..21d90f0888 100644 --- a/src/test/test-util.c +++ b/src/test/test-util.c @@ -28,6 +28,7 @@ #include "fileio.h" #include "fs-util.h" #include "parse-util.h" +#include "process-util.h" #include "raw-clone.h" #include "rm-rf.h" #include "string-util.h" diff --git a/src/test/test-watchdog.c b/src/test/test-watchdog.c index e068d1ddd4..ffcf408f57 100644 --- a/src/test/test-watchdog.c +++ b/src/test/test-watchdog.c @@ -18,6 +18,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <string.h> #include <unistd.h> #include "env-util.h" diff --git a/src/udev/udevadm-control.c b/src/udev/udevadm-control.c index d80d61583d..9546a6ebaf 100644 --- a/src/udev/udevadm-control.c +++ b/src/udev/udevadm-control.c @@ -21,6 +21,7 @@ #include <string.h> #include <unistd.h> +#include "process-util.h" #include "time-util.h" #include "udev-util.h" #include "udev.h" diff --git a/src/veritysetup/veritysetup-generator.c b/src/veritysetup/veritysetup-generator.c index c29c6f0bb3..24bee41243 100644 --- a/src/veritysetup/veritysetup-generator.c +++ b/src/veritysetup/veritysetup-generator.c @@ -18,6 +18,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> #include <stdbool.h> #include <stdlib.h> #include <sys/stat.h> diff --git a/src/veritysetup/veritysetup.c b/src/veritysetup/veritysetup.c index d3066ca429..3b4e72bf9e 100644 --- a/src/veritysetup/veritysetup.c +++ b/src/veritysetup/veritysetup.c @@ -18,14 +18,15 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <errno.h> #include <stdio.h> #include <sys/stat.h> +#include "alloc-util.h" #include "crypt-util.h" -#include "log.h" #include "hexdecoct.h" +#include "log.h" #include "string-util.h" -#include "alloc-util.h" static char *arg_root_hash = NULL; static char *arg_data_what = NULL; |