From 010f917cf222d2c7205584056fe0e4c581a2e1b1 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Thu, 16 May 2019 22:09:46 +0300 Subject: [PATCH 1/4] src/udev/udev-event.c must #include Fixes the following build failure with musl: ../git/src/udev/udev-event.c: In function 'spawn_wait': ../git/src/udev/udev-event.c:600:53: error: 'WEXITED' undeclared (first use in this function); did you mean 'WIFEXITED'? r = sd_event_add_child(e, NULL, spawn->pid, WEXITED, on_spawn_sigchld, spawn); ^~~~~~~ This looks like a bug in udev-event.c that could also have broken the compilation after some future glibc header reshuffle. --- src/udev/udev-event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c index cab1b5ac0c5..a0a7ac0f9e0 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "sd-event.h" From 56fb30d93e96d7f983af0cb4dff9155da91dd671 Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Mon, 25 Feb 2019 16:37:19 +0800 Subject: [PATCH 2/4] socket-util.h: include string.h Fix the following compile error: src/basic/socket-util.h:187:30: error: implicit declaration of function 'strnlen'; did you mean 'strlen'? [-Werror=implicit-function-declaration] --- src/basic/socket-util.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/basic/socket-util.h b/src/basic/socket-util.h index 6920fd99ba5..36ec422f2c0 100644 --- a/src/basic/socket-util.h +++ b/src/basic/socket-util.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include From 8a8e84d297551793a055b6823d8c437b42c42572 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Thu, 16 May 2019 22:20:07 +0300 Subject: [PATCH 3/4] Replace the legacy ULONG_LONG_MAX with the C99 ULLONG_MAX --- src/journal-remote/journal-remote-main.c | 4 ++-- src/shutdown/shutdown.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c index 2321a91e7bd..d32c51c3cec 100644 --- a/src/journal-remote/journal-remote-main.c +++ b/src/journal-remote/journal-remote-main.c @@ -528,7 +528,7 @@ static int dispatch_http_event(sd_event_source *event, void *userdata) { MHDDaemonWrapper *d = userdata; int r; - MHD_UNSIGNED_LONG_LONG timeout = ULONG_LONG_MAX; + MHD_UNSIGNED_LONG_LONG timeout = ULLONG_MAX; assert(d); @@ -538,7 +538,7 @@ static int dispatch_http_event(sd_event_source *event, return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "MHD_run failed!"); if (MHD_get_timeout(d->daemon, &timeout) == MHD_NO) - timeout = ULONG_LONG_MAX; + timeout = ULLONG_MAX; r = sd_event_source_set_time(d->timer_event, timeout); if (r < 0) { diff --git a/src/shutdown/shutdown.c b/src/shutdown/shutdown.c index 35b2c2aa463..9623fe9ea29 100644 --- a/src/shutdown/shutdown.c +++ b/src/shutdown/shutdown.c @@ -212,7 +212,7 @@ static int sync_making_progress(unsigned long long *prev_dirty) { } static void sync_with_progress(void) { - unsigned long long dirty = ULONG_LONG_MAX; + unsigned long long dirty = ULLONG_MAX; unsigned checks; pid_t pid; int r; From 56e3c9581e2c9b7435d5fcbd74b47c7ccf6b3891 Mon Sep 17 00:00:00 2001 From: Andrej Valek Date: Thu, 18 Apr 2019 10:47:11 +0200 Subject: [PATCH 4/4] fs-util.h: add missing sys/stat include fix error: | error: passing argument 5 of 'chase_symlinks_and_stat' from incompatible pointer type [-Werror=incompatible-pointer-types] --- src/basic/fs-util.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h index b9651205e60..c153bc4448d 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include