diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2022-12-08 09:45:20 +0000 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2022-12-12 10:36:18 +0000 |
commit | 1a6f4db75435211c67b4fc41abcd8396310a03eb (patch) | |
tree | 5fbb6cc76a8c7c22f88f9202ca019de14e95ff13 | |
parent | 191dda058aa5d441d374fed6218b3bd36e37f488 (diff) | |
download | libvirt-1a6f4db75435211c67b4fc41abcd8396310a03eb.tar.gz |
meson: remove obsolete check for BPF_PROG_QUERY
The BPF_PROG_QUERY constant was introduced to Linux in
commit defd9c476fa6b01b4eb5450452bfd202138decb7
Author: Alexei Starovoitov <ast@kernel.org>
Date: Mon Oct 2 22:50:26 2017 -0700
libbpf: sync bpf.h
This is old enough that all our supported platforms can be assumed
to have this feature.
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
-rw-r--r-- | meson.build | 1 | ||||
-rw-r--r-- | src/util/virbpf.c | 6 | ||||
-rw-r--r-- | src/util/virbpf.h | 6 |
3 files changed, 6 insertions, 7 deletions
diff --git a/meson.build b/meson.build index 95bc89ec52..790d52ec8d 100644 --- a/meson.build +++ b/meson.build @@ -647,7 +647,6 @@ symbols = [ if host_machine.system() == 'linux' symbols += [ # Check if we have new enough kernel to support BPF devices for cgroups v2 - [ 'linux/bpf.h', 'BPF_PROG_QUERY' ], [ 'linux/bpf.h', 'BPF_CGROUP_DEVICE' ], ] endif diff --git a/src/util/virbpf.c b/src/util/virbpf.c index 1169b99d07..34abf6f9b4 100644 --- a/src/util/virbpf.c +++ b/src/util/virbpf.c @@ -24,7 +24,7 @@ VIR_LOG_INIT("util.bpf"); #define VIR_FROM_THIS VIR_FROM_BPF -#if WITH_SYS_SYSCALL_H && WITH_DECL_BPF_PROG_QUERY +#ifdef __linux__ # include <sys/syscall.h> # include <unistd.h> @@ -292,7 +292,7 @@ virBPFDeleteElem(int mapfd, } -#else /* !WITH_SYS_SYSCALL_H || !WITH_DECL_BPF_PROG_QUERY */ +#else /* ! __linux__ */ int @@ -420,4 +420,4 @@ virBPFDeleteElem(int mapfd G_GNUC_UNUSED, errno = ENOSYS; return -1; } -#endif /* !WITH_SYS_SYSCALL_H || !WITH_DECL_BPF_PROG_QUERY */ +#endif /* !__linux__ */ diff --git a/src/util/virbpf.h b/src/util/virbpf.h index 1eafce86c0..cf21ac2d40 100644 --- a/src/util/virbpf.h +++ b/src/util/virbpf.h @@ -18,7 +18,7 @@ #pragma once -#if WITH_DECL_BPF_PROG_QUERY +#ifdef __linux__ # include <linux/bpf.h> @@ -171,7 +171,7 @@ .imm = 0, \ }) -#else /* WITH_DECL_BPF_PROG_QUERY */ +#else /* ! __linux__ */ struct bpf_prog_info; struct bpf_map_info; @@ -191,7 +191,7 @@ struct bpf_insn; # define VIR_BPF_CALL_INSN(func) # define VIR_BPF_EXIT_INSN() -#endif /* WITH_DECL_BPF_PROG_QUERY */ +#endif /* ! __linux__ */ int virBPFCreateMap(unsigned int mapType, |