tracing: Hide __NR_utimensat and _NR_mq_timedsend when not defined

Some architectures (riscv-32) do not define __NR_utimensat and
_NR_mq_timedsend, and fails to build when they are used.

Hide them in "ifdef"s.

Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://patch.msgid.link/20251104205310.00a1db9a@batman.local.home
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511031239.ZigDcWzY-lkp@intel.com/
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
Steven Rostedt
2025-11-04 20:53:10 -05:00
committed by Steven Rostedt (Google)
parent 2f294c35c0
commit a10e6e6818

View File

@@ -1072,7 +1072,9 @@ static void check_faultable_syscall(struct trace_event_call *call, int nr)
switch (nr) {
/* user arg 1 with size arg at 2 */
case __NR_write:
#ifdef __NR_mq_timedsend
case __NR_mq_timedsend:
#endif
case __NR_pwrite64:
sys_data->user_mask = BIT(1);
sys_data->user_arg_size = 2;
@@ -1186,7 +1188,9 @@ static void check_faultable_syscall(struct trace_event_call *call, int nr)
case __NR_syslog:
case __NR_statx:
case __NR_unlinkat:
#ifdef __NR_utimensat
case __NR_utimensat:
#endif
sys_data->user_mask = BIT(1);
break;
/* user arg at position 2 */