]> granicus.if.org Git - strace/commit
filter_seccomp: fix build for no-MMU targets
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 4 Oct 2019 13:16:33 +0000 (13:16 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 4 Oct 2019 21:58:20 +0000 (21:58 +0000)
commit509400106aeb0f7df1e9ace2b20ed22a42a7a1d0
tree5a4bd8f5bea0fdbf802d4eb73a455b14a7e8c892
parent739b39c611073c62cb0076a90300e6921625accb
filter_seccomp: fix build for no-MMU targets

Avoid unsupported fork() call on no-MMU Linux systems to fix
the following link error:

ld: strace-filter_seccomp.o: in function `check_seccomp_filter':
filter_seccomp.c:(.text+0x39a): undefined reference to `fork'
collect2: error: ld returned 1 exit status

* filter_seccomp.c (__gcov_flush, check_seccomp_order_do_child,
check_seccomp_order_tracer): Move under HAVE_FORK guard.
(check_seccomp_order): Move fork code under HAVE_FORK guard.
(check_seccomp_filter_properties): Do not check for NOMMU_SYSTEM.
* NEWS: Mention this fix.

Reported-and-tested-by: Baruch Siach <baruch@tkos.co.il>
Fixes: v5.3~7 "Introduce seccomp-assisted syscall filtering"
NEWS
filter_seccomp.c