[lxc-devel] [PATCH] Conditional compilation for ARM and PPC
Christian Brauner
christian.brauner at mailbox.org
Thu Dec 3 18:24:40 UTC 2015
Check if symbols SCMP_ARCH_ARM and SCMP_ARCH_PPC are defined.
Signed-off-by: Christian Brauner <christian.brauner at mailbox.org>
---
src/lxc/seccomp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/lxc/seccomp.c b/src/lxc/seccomp.c
index c5f1885..5982cb4 100644
--- a/src/lxc/seccomp.c
+++ b/src/lxc/seccomp.c
@@ -300,6 +300,7 @@ static int parse_config_v2(FILE *f, char *line, struct lxc_conf *conf)
default_policy_action);
if (!compat_ctx)
goto bad;
+#ifdef SCMP_ARCH_PPC
} else if (native_arch == lxc_seccomp_arch_ppc64) {
cur_rule_arch = lxc_seccomp_arch_all;
compat_arch = SCMP_ARCH_PPC;
@@ -307,6 +308,8 @@ static int parse_config_v2(FILE *f, char *line, struct lxc_conf *conf)
default_policy_action);
if (!compat_ctx)
goto bad;
+#endif
+#ifdef SCMP_ARCH_ARM
} else if (native_arch == lxc_seccomp_arch_arm64) {
cur_rule_arch = lxc_seccomp_arch_all;
compat_arch = SCMP_ARCH_ARM;
@@ -314,6 +317,7 @@ static int parse_config_v2(FILE *f, char *line, struct lxc_conf *conf)
default_policy_action);
if (!compat_ctx)
goto bad;
+#endif
}
if (default_policy_action != SCMP_ACT_KILL) {
--
2.6.3
More information about the lxc-devel
mailing list