Build fix: arm64: incomplete landlock_rule_type type
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 13 Dec 2022 17:32:30 +0000 (12:32 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 13 Dec 2022 21:43:11 +0000 (16:43 -0500)
While building the arm32 compatibility syscall instrumentation for
arm64, the build fails because types related to `landlock` are unknown.

Fixes:

/root/lttng-modules/src/../include/instrumentation/syscalls/headers/arm-32-syscalls_pointers.h:1428:138: error: conversion to incomplete type
 1428 |  TP_FIELDS(sc_exit(ctf_integer(long, ret, ret)) sc_inout(ctf_integer(const int, ruleset_fd, ruleset_fd)) sc_inout(ctf_integer(const enum landlock_rule_type, rule
_type, rule_type)) sc_inout(ctf_integer(const void *const, rule_attr, rule_attr)) sc_inout(ctf_integer(const __u32, flags, flags)))

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Id898958b33ec241be792a731560f227917e35010

src/lttng-syscalls.h

index ce63973f8f6e430f8c09ca6a1d37ddd3eda3e7f6..a6bc30fb79e01598fe362e54fc57b497a21d0aca 100644 (file)
 #include <lttng/events.h>
 #include <lttng/kernel-version.h>
 
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,13,0))
+#include <linux/landlock.h>
+#else
+struct landlock_ruleset_attr;
+
+enum landlock_rule_type {
+       LANDLOCK_RULE_PATH_BENEATH = 1,
+};
+#endif
+
 /*
  * Forward declarations allowing LTTng to build its system call instrumentation
  * against old kernels which do not declare the more recent system call
This page took 0.025351 seconds and 4 git commands to generate.