Build fix: POD static_assert check fails on lttng_event_exclusions
[lttng-tools.git] / src / common / lttng-kernel.hpp
index 6b1f7985db589fd847df9f651a404be55aa06f1e..2de7ef81067cdbbb3a3e61820a815b56ed1cf15f 100644 (file)
@@ -10,6 +10,7 @@
 #define _LTTNG_KERNEL_H
 
 #include <stdint.h>
+#include <common/compiler.hpp>
 #include <common/macros.hpp>
 #include <lttng/constant.h>
 #include <lttng/event.h>
@@ -86,7 +87,7 @@ struct lttng_kernel_abi_perf_counter_ctx {
 
 /* Event/Channel context */
 #define LTTNG_KERNEL_ABI_CONTEXT_PADDING1  16
-#define LTTNG_KERNEL_ABI_CONTEXT_PADDING2  LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32
+#define LTTNG_KERNEL_ABI_CONTEXT_PADDING2  ((LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32))
 struct lttng_kernel_abi_context {
        enum lttng_kernel_abi_context_type ctx;
        char padding[LTTNG_KERNEL_ABI_CONTEXT_PADDING1];
@@ -159,7 +160,7 @@ struct lttng_kernel_abi_function {
 } LTTNG_PACKED;
 
 #define LTTNG_KERNEL_ABI_EVENT_PADDING1    8
-#define LTTNG_KERNEL_ABI_EVENT_PADDING2    LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32
+#define LTTNG_KERNEL_ABI_EVENT_PADDING2    ((LTTNG_KERNEL_ABI_SYM_NAME_LEN + 32))
 struct lttng_kernel_abi_event {
        char name[LTTNG_KERNEL_ABI_SYM_NAME_LEN];
        enum lttng_kernel_abi_instrumentation instrumentation;
@@ -275,13 +276,13 @@ struct lttng_kernel_abi_tracer_abi_version {
 
 struct lttng_kernel_abi_syscall_mask {
        uint32_t len;   /* in bits */
-       char mask[];
+       char mask[LTTNG_FLEXIBLE_ARRAY_MEMBER_LENGTH];
 } LTTNG_PACKED;
 
 /*
  * kernel channel
  */
-#define LTTNG_KERNEL_ABI_CHANNEL_PADDING1 LTTNG_SYMBOL_NAME_LEN + 32
+#define LTTNG_KERNEL_ABI_CHANNEL_PADDING1 ((LTTNG_SYMBOL_NAME_LEN + 32))
 struct lttng_kernel_abi_channel {
        uint64_t subbuf_size;               /* bytes */
        uint64_t num_subbuf;                /* power of 2 */
This page took 0.023331 seconds and 4 git commands to generate.