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.
This commit is contained in:
committed by
Yu Watanabe
parent
68181cf8a7
commit
7a8288f6ed
@@ -1,6 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#if HAVE_SECCOMP
|
||||
|
||||
#include <seccomp.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
@@ -152,3 +154,11 @@ static inline const char *seccomp_errno_or_action_to_string(int num) {
|
||||
int parse_syscall_and_errno(const char *in, char **name, int *error);
|
||||
|
||||
int seccomp_suppress_sync(void);
|
||||
|
||||
#else
|
||||
|
||||
static inline bool is_seccomp_available(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user