0002-softmmu-qemu-seccomp.c-add-missing-header-for-CLONE_.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From df07d3754bdf15e0efac244cfee290c9bac86352 Mon Sep 17 00:00:00 2001
  2. From: Romain Naour <romain.naour@gmail.com>
  3. Date: Mon, 2 May 2022 23:17:46 +0200
  4. Subject: [PATCH] softmmu/qemu-seccomp.c: add missing header for CLONE_NEWGROUP
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. With seccomp support enabled Qemu 7.0.0 fail to build with the
  9. following error:
  10. ../softmmu/qemu-seccomp.c:116:19: error: ‘CLONE_NEWCGROUP’ undeclared here (not in a function)
  11. 116 | FORBID_CLONE_FLAG(CLONE_NEWCGROUP);
  12. | ^~~~~~~~~~~~~~~
  13. ../softmmu/qemu-seccomp.c:73:18: note: in definition of macro ‘FORBID_CLONE_FLAG’
  14. 73 | .datum_a = flag, .datum_b = flag } }
  15. | ^~~~
  16. CLONE_NEWCGROUP has been added in Qemu 7.0.0 by commit [1].
  17. [1] https://git.qemu.org/?p=qemu.git;a=commitdiff;h=5a2f693f07a1e93ada5277b2fb1530b2698be0fa
  18. Signed-off-by: Romain Naour <romain.naour@gmail.com>
  19. ---
  20. softmmu/qemu-seccomp.c | 1 +
  21. 1 file changed, 1 insertion(+)
  22. diff --git a/softmmu/qemu-seccomp.c b/softmmu/qemu-seccomp.c
  23. index deaf8a4ef5..96c83e121f 100644
  24. --- a/softmmu/qemu-seccomp.c
  25. +++ b/softmmu/qemu-seccomp.c
  26. @@ -21,6 +21,7 @@
  27. #include <sys/prctl.h>
  28. #include <seccomp.h>
  29. #include "sysemu/seccomp.h"
  30. +#include <linux/sched.h>
  31. #include <linux/seccomp.h>
  32. /* For some architectures (notably ARM) cacheflush is not supported until
  33. --
  34. 2.35.1