]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Conditional compilation for ARM and PPC
authorChristian Brauner <christian.brauner@mailbox.org>
Thu, 3 Dec 2015 18:24:40 +0000 (19:24 +0100)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 3 Dec 2015 18:52:29 +0000 (13:52 -0500)
Check if symbols SCMP_ARCH_ARM and SCMP_ARCH_PPC are defined.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/seccomp.c

index c5f188550876041333e8c98111725d0ebfc30947..5982cb475062b72ea2c5d4b7d9371f56f8c02d90 100644 (file)
@@ -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) {