[lxc-devel] [PATCH] Conditional compilation for ARM and PPC

Serge Hallyn serge.hallyn at ubuntu.com
Thu Dec 3 18:41:04 UTC 2015


Quoting Christian Brauner (christian.brauner at mailbox.org):
> Check if symbols SCMP_ARCH_ARM and SCMP_ARCH_PPC are defined.
> 
> Signed-off-by: Christian Brauner <christian.brauner at mailbox.org>

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  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
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list