From efefd9fb4137ecdf59973e55586a4bc50cff4ad3 Mon Sep 17 00:00:00 2001
From: qiangxuhui <qiangxuhui@loongson.cn>
Date: Mon, 6 Jan 2025 09:46:11 +0800
Subject: [PATCH 177/198] add loongarch64 support

---
 src/daemon/modules/spec/specs_security.c | 1 +
 src/utils/cutils/utils.c                 | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/daemon/modules/spec/specs_security.c b/src/daemon/modules/spec/specs_security.c
index b34aec7c..4a71a1b5 100644
--- a/src/daemon/modules/spec/specs_security.c
+++ b/src/daemon/modules/spec/specs_security.c
@@ -332,6 +332,7 @@ static char *seccomp_trans_arch_for_docker(const char *arch)
         { "SCMP_ARCH_PARISC", "parisc" },
         { "SCMP_ARCH_PARISC64", "parisc64" },
         { "SCMP_ARCH_RISCV64", "riscv64" },
+        { "SCMP_ARCH_LOONGARCH64", "loong64" },
         { "SCMP_ARCH_ALL", "all" }
     };
     for (i = 0; i < sizeof(arch_map) / sizeof(arch_map[0]); i++) {
diff --git a/src/utils/cutils/utils.c b/src/utils/cutils/utils.c
index cf207acc..4db7d9ac 100644
--- a/src/utils/cutils/utils.c
+++ b/src/utils/cutils/utils.c
@@ -1442,7 +1442,8 @@ static void normalized_host_arch(char **host_arch, struct utsname uts)
         { "armhf", "arm" },
         { "armel", "arm" },
         { "mips64le", "mips64le" },
-        { "mips64el", "mips64le" }
+        { "mips64el", "mips64le" },
+        { "loongarch64", "loong64" }
     };
     size_t i = 0;
 
-- 
2.34.1

