From 5ca7b8a36c04e0733b6661d519343eb586d75a51 Mon Sep 17 00:00:00 2001 From: Samuel Martin Date: Mon, 17 Jun 2013 10:28:51 -0400 Subject: [PATCH] Fix build and load against linux-2.6.33.x * lttng-event.h declared but did not implement lttng_add_perf_counter_to_ctx on kernel >=2.6.33, the implementation was in lttng-context-perf-counters.c, which was only included for kernel >=2.6.34. This prevented the module from being loaded. * on kernel 2.6.33.x, lttng-context-perf-counters.c complains about implicit declaration for {get,put}_online_cpus and {,un}register_cpu_notifier; so fix header inclusion. Signed-off-by: Samuel Martin Signed-off-by: Mathieu Desnoyers --- Makefile | 2 +- lttng-context-perf-counters.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 39672afc..a9d1cb15 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ endif # CONFIG_HAVE_SYSCALL_TRACEPOINTS ifneq ($(CONFIG_PERF_EVENTS),) lttng-tracer-objs += $(shell \ if [ $(VERSION) -ge 3 \ - -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 34 \) ] ; then \ + -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 33 \) ] ; then \ echo "lttng-context-perf-counters.o" ; fi;) endif # CONFIG_PERF_EVENTS diff --git a/lttng-context-perf-counters.c b/lttng-context-perf-counters.c index 73f4e958..d65f6908 100644 --- a/lttng-context-perf-counters.c +++ b/lttng-context-perf-counters.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "lttng-events.h" #include "wrapper/ringbuffer/frontend_types.h" #include "wrapper/vmalloc.h" -- 2.39.5