diff --git a/libraries/AP_HAL_Linux/Perf.cpp b/libraries/AP_HAL_Linux/Perf.cpp index 5ba770f805..25486fc942 100644 --- a/libraries/AP_HAL_Linux/Perf.cpp +++ b/libraries/AP_HAL_Linux/Perf.cpp @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ -#if !defined(PERF_LTTNG) +#ifndef HAVE_LTTNG_UST #include #include diff --git a/libraries/AP_HAL_Linux/Perf_Lttng.cpp b/libraries/AP_HAL_Linux/Perf_Lttng.cpp index 95d80f5819..a61375b4e4 100644 --- a/libraries/AP_HAL_Linux/Perf_Lttng.cpp +++ b/libraries/AP_HAL_Linux/Perf_Lttng.cpp @@ -12,7 +12,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#if defined(PERF_LTTNG) +#ifdef HAVE_LTTNG_UST #define TRACEPOINT_CREATE_PROBES #define TRACEPOINT_DEFINE diff --git a/libraries/AP_HAL_Linux/Perf_Lttng_TracePoints.h b/libraries/AP_HAL_Linux/Perf_Lttng_TracePoints.h index e8ad271221..45b5804bc0 100644 --- a/libraries/AP_HAL_Linux/Perf_Lttng_TracePoints.h +++ b/libraries/AP_HAL_Linux/Perf_Lttng_TracePoints.h @@ -59,7 +59,7 @@ TRACEPOINT_EVENT( ) ) -#endif /* _HELLO_TP_H */ +#endif #include diff --git a/mk/board_native.mk b/mk/board_native.mk index 56112fdf5b..fd94c0884c 100644 --- a/mk/board_native.mk +++ b/mk/board_native.mk @@ -34,10 +34,10 @@ COPTS = -ffunction-sections -fdata-sections -fsigned-char ASOPTS = -x assembler-with-cpp # features: TODO detect dependecy and make them optional -HAVE_LTTNG= +HAVE_LTTNG_UST= -ifeq ($(HAVE_LTTNG),1) -DEFINES += -DPERF_LTTNG=1 +ifeq ($(HAVE_LTTNG_UST),1) +DEFINES += -DHAVE_LTTNG_UST=1 LIBS += -llttng-ust -ldl endif