Skip to content
Snippets Groups Projects
Commit fdb63ab2 authored by Matt Selsky's avatar Matt Selsky
Browse files

Check for libseccomp via pkg-config first, then fall back to a direct search

Needed on openSUSE, at least, where the libseccomp headers are not installed in
/usr/include

Fixes GitLab issue #308
parent 06faf186
No related branches found
No related tags found
Loading
Pipeline #
......@@ -825,8 +825,14 @@ int main(int argc, char **argv) {
if ctx.env.DEST_OS != "linux":
ctx.fatal("seccomp is only supported on Linux")
ctx.check_cc(header_name="seccomp.h")
ctx.check_cc(lib="seccomp")
# Check via pkg-config first, then fall back to a direct search
if not ctx.check_cfg(
package='libseccomp', args=['--libs', '--cflags'],
uselib_store='SECCOMP', define_name='HAVE_SECCOMP_H',
mandatory=False
):
ctx.check_cc(header_name="seccomp.h")
ctx.check_cc(lib="seccomp")
from wafhelpers.check_pthread import check_pthread_header_lib
check_pthread_header_lib(ctx)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment