mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
meson.build: check for SYS_pidfd_open
This commit is contained in:
parent
18b3efa2ed
commit
14eb43ea86
3 changed files with 9 additions and 0 deletions
|
|
@ -812,7 +812,11 @@ static int monitor_test_forked(struct pwtest_test *t, pid_t pid, int read_fds[_F
|
|||
size_t nevents = 0;
|
||||
int r;
|
||||
|
||||
#if HAVE_PIDFD_OPEN
|
||||
pidfd = syscall(SYS_pidfd_open, pid, 0);
|
||||
#else
|
||||
errno = ENOSYS;
|
||||
#endif
|
||||
/* If we don't have pidfd, we use a timerfd to ping us every 20ms */
|
||||
if (pidfd < 0 && errno == ENOSYS) {
|
||||
pidfd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue