linux-perf: Fix BPF feature detection
This commit is contained in:
parent
b61e29e69c
commit
88995ec002
|
@ -1,3 +1,9 @@
|
||||||
|
linux (4.18.10-3) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* linux-perf: Fix BPF feature detection
|
||||||
|
|
||||||
|
-- Ben Hutchings <ben@decadent.org.uk> Mon, 08 Oct 2018 19:02:53 +0100
|
||||||
|
|
||||||
linux (4.18.10-2) unstable; urgency=medium
|
linux (4.18.10-2) unstable; urgency=medium
|
||||||
|
|
||||||
[ Ben Hutchings ]
|
[ Ben Hutchings ]
|
||||||
|
|
|
@ -11,14 +11,17 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||||
---
|
---
|
||||||
--- a/tools/build/feature/test-bpf.c
|
--- a/tools/build/feature/test-bpf.c
|
||||||
+++ b/tools/build/feature/test-bpf.c
|
+++ b/tools/build/feature/test-bpf.c
|
||||||
@@ -31,9 +31,5 @@ int main(void)
|
@@ -35,8 +35,10 @@ int main(void)
|
||||||
attr.kern_version = 0;
|
|
||||||
attr.prog_flags = 0;
|
attr.prog_flags = 0;
|
||||||
|
|
||||||
- /*
|
/*
|
||||||
- * Test existence of __NR_bpf and BPF_PROG_LOAD.
|
- * Test existence of __NR_bpf and BPF_PROG_LOAD.
|
||||||
- * This call should fail if we run the testcase.
|
- * This call should fail if we run the testcase.
|
||||||
- */
|
+ * bwh: Don't use the bpf() syscall as we might be building on a
|
||||||
|
+ * much older kernel. Do "use" the attr structure here to avoid
|
||||||
|
+ * a "set but not used" warning.
|
||||||
|
*/
|
||||||
- return syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr));
|
- return syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr));
|
||||||
|
+ (void)&attr;
|
||||||
+ return 0;
|
+ return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue