summaryrefslogtreecommitdiffstats
path: root/src/test/test-fd-util.c
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2021-11-24 15:04:30 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-11-25 05:22:32 +0100
commit7a8288f6ed185f8033b59a007ace956df7fc8ff5 (patch)
treee8f5bff1c68222860ae9cfe0e25cc3dd83629395 /src/test/test-fd-util.c
parentbuild(deps): bump github/codeql-action from 1.0.23 to 1.0.24 (diff)
downloadsystemd-7a8288f6ed185f8033b59a007ace956df7fc8ff5.tar.xz
systemd-7a8288f6ed185f8033b59a007ace956df7fc8ff5.zip
build: fix build without seccomp
- execute.c: bpf functions were in the middle of an #if HAVE_SECCOMP block for no reason - test-fd-util.c: make seccomp-util.h includable without depending on <seccomp.h>, and make is_seccomp_available() hardcoded to returning false in this case. Also fix a stray DEFINED() -- HAVE_SECCOMP is defined as 0, so normal #if should be used like everywhere else.
Diffstat (limited to 'src/test/test-fd-util.c')
-rw-r--r--src/test/test-fd-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-fd-util.c b/src/test/test-fd-util.c
index 3638103bf1..8e8dd023af 100644
--- a/src/test/test-fd-util.c
+++ b/src/test/test-fd-util.c
@@ -292,7 +292,7 @@ static void test_close_all_fds_inner(void) {
}
static int seccomp_prohibit_close_range(void) {
-#if defined(HAVE_SECCOMP) && defined(__SNR_close_range)
+#if HAVE_SECCOMP && defined(__SNR_close_range)
_cleanup_(seccomp_releasep) scmp_filter_ctx seccomp = NULL;
int r;