Fix: namespace contexts !CONFIG_RCU_TLS variable initialization
[deliverable/lttng-ust.git] / liblttng-ust / lttng-context-ipc-ns.c
index c973dc86dd06ec246f627a8bc7bbf17a80ef2cf2..9890b03b5ed39340df16b5d162658b147529e2cd 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include "lttng-tracer-core.h"
 #include "ns.h"
 
-
 /*
  * We cache the result to ensure we don't stat(2) the proc filesystem on
  * each event.
  */
+#ifdef CONFIG_RCU_TLS
 static DEFINE_URCU_TLS(ino_t, cached_ipc_ns) = NS_INO_UNINITIALIZED;
+#else
+static DEFINE_URCU_TLS_INIT(ino_t, cached_ipc_ns, NS_INO_UNINITIALIZED);
+#endif
 
 static
 ino_t get_ipc_ns(void)
This page took 0.024479 seconds and 5 git commands to generate.