diff mbox series

[RFC,2/3] qemu-seccomp: manually expand SCMP_A1

Message ID 20180810171102.16451-3-alex.bennee@linaro.org
State New
Headers show
Series tweaks for QEMU's C standard | expand

Commit Message

Alex Bennée Aug. 10, 2018, 5:11 p.m. UTC
The expansion of ((struct scmp_arg_cmp){1, SCMP_CMP_NE, 5}) doesn't
work with -std=gnu99.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 qemu-seccomp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Eduardo Otubo Aug. 21, 2018, 12:06 p.m. UTC | #1
On 10/08/2018 - 18:11:00, Alex Bennée wrote:
> The expansion of ((struct scmp_arg_cmp){1, SCMP_CMP_NE, 5}) doesn't

> work with -std=gnu99.

> 

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> ---

>  qemu-seccomp.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/qemu-seccomp.c b/qemu-seccomp.c

> index 9cd8eb9499..4dc1c22924 100644

> --- a/qemu-seccomp.c

> +++ b/qemu-seccomp.c

> @@ -39,7 +39,7 @@ struct QemuSeccompSyscall {

>  };

>  

>  const struct scmp_arg_cmp sched_setscheduler_arg[] = {

> -    SCMP_A1(SCMP_CMP_NE, SCHED_IDLE)

> +    {1, SCMP_CMP_NE, SCHED_IDLE}

>  };

>  

>  static const struct QemuSeccompSyscall blacklist[] = {

> -- 

> 2.17.1

> 

Acked-by: Eduardo Otubo <otubo@redhat.com>
diff mbox series

Patch

diff --git a/qemu-seccomp.c b/qemu-seccomp.c
index 9cd8eb9499..4dc1c22924 100644
--- a/qemu-seccomp.c
+++ b/qemu-seccomp.c
@@ -39,7 +39,7 @@  struct QemuSeccompSyscall {
 };
 
 const struct scmp_arg_cmp sched_setscheduler_arg[] = {
-    SCMP_A1(SCMP_CMP_NE, SCHED_IDLE)
+    {1, SCMP_CMP_NE, SCHED_IDLE}
 };
 
 static const struct QemuSeccompSyscall blacklist[] = {