From 536e95cfb387b985f6331c9c85fca652219493d3 Mon Sep 17 00:00:00 2001 From: liuxiang Date: Mon, 15 Jan 2024 16:49:29 +0800 Subject: [PATCH] Fix compilation error on Loong64. Signed-off-by: liuxiang --- src/arping.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/arping.c b/src/arping.c index 8501871..507b15b 100644 --- a/src/arping.c +++ b/src/arping.c @@ -645,7 +645,11 @@ static void drop_seccomp(int libnet_fd) // // Write to stdout and stderr. +#if defined(__loongarch64) + if (seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(statx), 1, SCMP_A0(SCMP_CMP_EQ, STDOUT_FILENO))) { +#else if (seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(fstat), 1, SCMP_A0(SCMP_CMP_EQ, STDOUT_FILENO))) { +#endif perror("seccomp_rule_add(fstat stdout)"); exit(1); }