From: Jérémie Galarneau Date: Tue, 13 Dec 2022 17:32:30 +0000 (-0500) Subject: Build fix: arm64: incomplete landlock_rule_type type X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a2819bd60badc2bcd61b325a9b144429fc956ba7;p=lttng-modules.git Build fix: arm64: incomplete landlock_rule_type type 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 Signed-off-by: Mathieu Desnoyers Change-Id: Id898958b33ec241be792a731560f227917e35010 --- diff --git a/src/lttng-syscalls.h b/src/lttng-syscalls.h index ce63973f..a6bc30fb 100644 --- a/src/lttng-syscalls.h +++ b/src/lttng-syscalls.h @@ -21,6 +21,16 @@ #include #include +#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,13,0)) +#include +#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