test: unbreak FreeBSD

This commit is contained in:
Evgeniy Khramtsov 2021-06-21 11:42:56 +03:00 committed by Wim Taymans
parent 6186fc775d
commit c3d7561d17
3 changed files with 5 additions and 2 deletions

View file

@ -283,7 +283,7 @@ if cc.has_function('sigabbrev_np', prefix : '#include <string.h>', args : [ '-D_
cdata.set('HAVE_SIGABBREV_NP', 1)
endif
if cc.get_define('SYS_pidfd_open', prefix : '#include <syscall.h>') != ''
if cc.get_define('SYS_pidfd_open', prefix : '#include <sys/syscall.h>') != ''
cdata.set('HAVE_PIDFD_OPEN', 1)
endif

View file

@ -10,6 +10,7 @@ pwtest_deps = [
mathlib,
dl_lib,
cap_lib,
epoll_shim_dep
]
pwtest_c_args = [

View file

@ -36,7 +36,9 @@
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <syscall.h>
#if HAVE_PIDFD_OPEN
#include <sys/syscall.h>
#endif
#if HAVE_LIBCAP
#include <sys/capability.h>
#endif