If LTTNG_PACKED is used to specify whether a structure is packed, but we
end up forgetting inclusion of lttng/ust-compiler.h (which defines it),
we end up silently _not_ packing the data structure, because
LTTNG_PACKED will be considered to be an identifier by the compiler,
and therefore simply ignored.
There are no such instances in lttng-ust, but let's add a ifdef check.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
#include <stdint.h>
#include <lttng/ust-compiler.h>
+#ifndef LTTNG_PACKED
+#error "LTTNG_PACKED should be defined"
+#endif
+
#ifndef __ust_stringify
#define __ust_stringify1(x) #x
#define __ust_stringify(x) __ust_stringify1(x)
#include <sys/types.h>
#include <limits.h>
+#ifndef LTTNG_PACKED
+#error "LTTNG_PACKED should be defined"
+#endif
+
#ifndef LTTNG_UST_UUID_LEN
#define LTTNG_UST_UUID_LEN 16
#endif
#include <urcu/ref.h>
#include <pthread.h>
+#ifndef LTTNG_PACKED
+#error "LTTNG_PACKED should be defined"
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
#include <lttng/ust-ctl.h>
#include <config.h>
+#ifndef LTTNG_PACKED
+#error "LTTNG_PACKED should be defined"
+#endif
+
/*
* Default timeout the application waits for the sessiond to send its
* "register done" command. Can be overridden with the environment
#include <lttng/ust-abi.h>
+#ifndef LTTNG_PACKED
+#error "LTTNG_PACKED should be defined"
+#endif
+
/*
* offsets are absolute from start of bytecode.
*/