diff --git a/meson.build b/meson.build index 6ea9fce85ad..0d68f146fd4 100644 --- a/meson.build +++ b/meson.build @@ -624,11 +624,13 @@ foreach ident : [ ['pidfd_send_signal', '''#include #include #include - #include '''], + #include + #include '''], ['pidfd_open', '''#include #include #include - #include '''], + #include + #include '''], ['rt_sigqueueinfo', '''#include #include #include diff --git a/src/basic/pidref.c b/src/basic/pidref.c index 875fa11bea8..ae04dd72a4b 100644 --- a/src/basic/pidref.c +++ b/src/basic/pidref.c @@ -1,5 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#if HAVE_PIDFD_OPEN +#include +#endif + #include "errno-util.h" #include "fd-util.h" #include "missing_syscall.h" diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index bd5bd81ac43..a1305ef0149 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -1,6 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include +#if HAVE_PIDFD_OPEN +#include +#endif #include #include diff --git a/src/libsystemd/sd-event/test-event.c b/src/libsystemd/sd-event/test-event.c index c6179359922..57dee392d74 100644 --- a/src/libsystemd/sd-event/test-event.c +++ b/src/libsystemd/sd-event/test-event.c @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ +#if HAVE_PIDFD_OPEN +#include +#endif #include #include diff --git a/src/libsystemd/sd-login/test-login.c b/src/libsystemd/sd-login/test-login.c index c83c953dd92..66e427411e4 100644 --- a/src/libsystemd/sd-login/test-login.c +++ b/src/libsystemd/sd-login/test-login.c @@ -1,6 +1,9 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include +#if HAVE_PIDFD_OPEN +#include +#endif #include "sd-login.h" diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c index e01f35b65e4..a711c89b12b 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c @@ -10,6 +10,9 @@ #include #include #include +#if HAVE_PIDFD_OPEN +#include +#endif #include #include #include diff --git a/src/test/test-aux-scope.c b/src/test/test-aux-scope.c index c6a1d292730..0170314035c 100644 --- a/src/test/test-aux-scope.c +++ b/src/test/test-aux-scope.c @@ -3,6 +3,9 @@ #include #include #include +#if HAVE_PIDFD_OPEN +#include +#endif #include #include "sd-event.h"