tracing/pt_test.c: Fix compiler errors on old distros
PATCH 1/1 tracing/pt_test.c: Fix compiler errors on old distros
Compilation fails on old distros which don't have linux/perf_event.h and LTP_CHECK_PERF_EVENT can check the existence of linux/perf_event.h as well, so we just include perf_event.h header file when HAVE_STRUCT_PERF_EVENT_MMAP_PAGE_AUX_HEAD is defined.
Signed-off-by Xiao Yang <[email protected]>
--- testcases/kernel/tracing/pt_test/pt_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/tracing/pt_test/pt_test.c +1 -1
@@ -14,7 +14,6 @@* kconfig requirement: CONFIG_PERF_EVENTS */ -#include <linux/perf_event.h> #include <sched.h> #include <stdlib.h> #include <stdio.h>
@@ -24,6 +23,7 @@#include "config.h" #ifdef HAVE_STRUCT_PERF_EVENT_MMAP_PAGE_AUX_HEAD +# include <linux/perf_event.h> #define PAGESIZE 4096#define INTEL_PT_MEMSIZE (17*PAGESIZE)
Signature · 1 line
1.8.3.1
PATCH 1/1 tracing/pt_test.c: Fix compiler errors on old distros
Hi!
Pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]