Cleanup: Move wrapper/ headers to include/wrapper/
[lttng-modules.git] / include / wrapper / namespace.h
diff --git a/include/wrapper/namespace.h b/include/wrapper/namespace.h
new file mode 100644 (file)
index 0000000..8e8a371
--- /dev/null
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
+ *
+ * wrapper/namespace.h
+ *
+ * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *               2019 Michael Jeanson <mjeanson@efficios.com>
+ *
+ */
+
+#ifndef _LTTNG_WRAPPER_NAMESPACE_H
+#define _LTTNG_WRAPPER_NAMESPACE_H
+
+#include <linux/version.h>
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0))
+#define lttng_ns_inum ns.inum
+#else
+#define lttng_ns_inum proc_inum
+#endif
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+#define lttng_user_ns_parent parent
+#else
+#define lttng_user_ns_parent creator->user_ns
+#endif
+
+#endif /* _LTTNG_WRAPPER_NAMESPACE_H */
This page took 0.02349 seconds and 4 git commands to generate.