From: Mathieu Desnoyers Date: Thu, 20 Sep 2012 14:20:38 +0000 (-0400) Subject: Fix cleanup: move lttng-tracer-core.h include to lib ringbuffer config.h X-Git-Tag: v2.1.0~15 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ae090dc5f192fba078e9b1a8c8aa88b73a8743da;p=lttng-modules.git Fix cleanup: move lttng-tracer-core.h include to lib ringbuffer config.h This is where it is used. Add a #ifdef check for the LTTNG_TRACER_CORE_H define to ensure that the header it depends on is always included. Signed-off-by: Mathieu Desnoyers --- diff --git a/lib/ringbuffer/config.h b/lib/ringbuffer/config.h index bd5ba77d..657c04d2 100644 --- a/lib/ringbuffer/config.h +++ b/lib/ringbuffer/config.h @@ -27,6 +27,7 @@ #include #include #include "../align.h" +#include "../../lttng-tracer-core.h" struct lib_ring_buffer; struct channel; @@ -241,6 +242,10 @@ void lib_ring_buffer_ctx_init(struct lib_ring_buffer_ctx *ctx, #define RING_BUFFER_RFLAG_FULL_TSC (1U << 0) #define RING_BUFFER_RFLAG_END (1U << 1) +#ifndef LTTNG_TRACER_CORE_H +#error "lttng-tracer-core.h is needed for RING_BUFFER_ALIGN define" +#endif + /* * We need to define RING_BUFFER_ALIGN_ATTR so it is known early at * compile-time. We have to duplicate the "config->align" information and the diff --git a/lib/ringbuffer/ring_buffer_frontend.c b/lib/ringbuffer/ring_buffer_frontend.c index a04333a3..dc0357f5 100644 --- a/lib/ringbuffer/ring_buffer_frontend.c +++ b/lib/ringbuffer/ring_buffer_frontend.c @@ -55,7 +55,6 @@ #include #include -#include "../../lttng-tracer-core.h" #include "../../wrapper/ringbuffer/config.h" #include "../../wrapper/ringbuffer/backend.h" #include "../../wrapper/ringbuffer/frontend.h"