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

2015-12-03 Thread Serge Hallyn
Quoting Christian Brauner (christian.brau...@mailbox.org):
> Check if symbols SCMP_ARCH_ARM and SCMP_ARCH_PPC are defined.
> 
> Signed-off-by: Christian Brauner 

Acked-by: Serge E. Hallyn 

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


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

2015-12-03 Thread Christian Brauner
Check if symbols SCMP_ARCH_ARM and SCMP_ARCH_PPC are defined.

Signed-off-by: Christian Brauner 
---
 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@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


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

2015-12-03 Thread Christian Brauner
Before commit 29753076fddfed772511c67887bed1f0621b32cf libseccomp does not
define the symbol SCMP_ARCH_PPC. Just for safety also add conditional
compilation instructions for SCMP_ARCH_ARM.

Christian Brauner (1):
  Conditional compilation for ARM and PPC

 src/lxc/seccomp.c | 4 
 1 file changed, 4 insertions(+)

-- 
2.6.3

___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel