Skip to content

Commit

Permalink
Conditional compilation for ARM and PPC
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian Brauner authored and stgraber committed Dec 3, 2015
1 parent 7635139 commit ca39959
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lxc/seccomp.c
Expand Up @@ -300,20 +300,24 @@ 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;
compat_ctx = get_new_ctx(lxc_seccomp_arch_ppc,
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;
compat_ctx = get_new_ctx(lxc_seccomp_arch_arm,
default_policy_action);
if (!compat_ctx)
goto bad;
#endif
}

if (default_policy_action != SCMP_ACT_KILL) {
Expand Down

0 comments on commit ca39959

Please sign in to comment.