From 006551b798d9066ca8cbd3f01b2309329c4ca20c Mon Sep 17 00:00:00 2001
From: yangchenguang <yangchenguang@kylinsec.com.cn>
Date: Fri, 12 May 2023 14:38:23 +0800
Subject: [PATCH] Add loongarch64 support

Signed-off-by: yangchenguang <yangchenguang@kylinsec.com.cn>
---
 programs/addconn/addconn.c     | 2 ++
 programs/pluto/pluto_seccomp.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/programs/addconn/addconn.c b/programs/addconn/addconn.c
index 527d5cf..900a6c7 100644
--- a/programs/addconn/addconn.c
+++ b/programs/addconn/addconn.c
@@ -99,7 +99,9 @@ static void init_seccomp_addconn(uint32_t def_action, struct logger *logger)
 	LSW_SECCOMP_ADD(epoll_pwait);
 	LSW_SECCOMP_ADD(exit_group);
 	LSW_SECCOMP_ADD(fcntl);
+#ifndef __loongarch64
 	LSW_SECCOMP_ADD(fstat);
+#endif
 	LSW_SECCOMP_ADD(futex);
 	LSW_SECCOMP_ADD(getdents);
 	LSW_SECCOMP_ADD(getegid);
diff --git a/programs/pluto/pluto_seccomp.c b/programs/pluto/pluto_seccomp.c
index 27b1560..775033f 100644
--- a/programs/pluto/pluto_seccomp.c
+++ b/programs/pluto/pluto_seccomp.c
@@ -138,7 +138,9 @@ static void init_seccomp(uint32_t def_action, bool main, struct logger *logger)
 	LSW_SECCOMP_ADD(exit);
 	LSW_SECCOMP_ADD(exit_group);
 	LSW_SECCOMP_ADD(fcntl);
+#ifndef __loongarch64
 	LSW_SECCOMP_ADD(fstat);
+#endif
 	LSW_SECCOMP_ADD(futex);
 	LSW_SECCOMP_ADD(getpid);
 	LSW_SECCOMP_ADD(gettid);
-- 
2.34.1

