1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

pidfd: properly detect if libc offers pidfd syscalls and make use of them then

We never updated the meson checks when glibc finally learned about these
syscalls, address that.
This commit is contained in:
Lennart Poettering 2024-05-08 12:27:38 +02:00 committed by Luca Boccassi
parent 6724a0f0a3
commit d6bfc3d889
7 changed files with 23 additions and 2 deletions

View File

@ -624,11 +624,13 @@ foreach ident : [
['pidfd_send_signal', '''#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>'''],
#include <sys/wait.h>
#include <sys/pidfd.h>'''],
['pidfd_open', '''#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>'''],
#include <sys/wait.h>
#include <sys/pidfd.h>'''],
['rt_sigqueueinfo', '''#include <stdlib.h>
#include <unistd.h>
#include <signal.h>

View File

@ -1,5 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#if HAVE_PIDFD_OPEN
#include <sys/pidfd.h>
#endif
#include "errno-util.h"
#include "fd-util.h"
#include "missing_syscall.h"

View File

@ -1,6 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <sys/epoll.h>
#if HAVE_PIDFD_OPEN
#include <sys/pidfd.h>
#endif
#include <sys/timerfd.h>
#include <sys/wait.h>

View File

@ -1,5 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#if HAVE_PIDFD_OPEN
#include <sys/pidfd.h>
#endif
#include <sys/wait.h>
#include <unistd.h>

View File

@ -1,6 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <poll.h>
#if HAVE_PIDFD_OPEN
#include <sys/pidfd.h>
#endif
#include "sd-login.h"

View File

@ -10,6 +10,9 @@
#include <security/pam_modules.h>
#include <security/pam_modutil.h>
#include <sys/file.h>
#if HAVE_PIDFD_OPEN
#include <sys/pidfd.h>
#endif
#include <sys/stat.h>
#include <sys/sysmacros.h>
#include <sys/types.h>

View File

@ -3,6 +3,9 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#if HAVE_PIDFD_OPEN
#include <sys/pidfd.h>
#endif
#include <sys/wait.h>
#include "sd-event.h"