seccomp: Don't include libseccomp from QEMU header
PATCH 1/1 seccomp: Don't include libseccomp from QEMU header
The only prototype doesn't need anything from the lib header, and not including it here allows files that include this header, for example vl.c, to compile without the libseccomp cflags.
The breakage is since c3883e1f93 for environments where `pkg-config --cflags libseccomp" is non-empty.
---
This is an alternative for
https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg04470.html
([Qemu-devel] [PATCH] seccomp: Fix build)
--- include/sysemu/seccomp.h | 2 -- 1 file changed, 2 deletions(-)
include/sysemu/seccomp.h +0 -2
@@ -21,7 +21,5 @@#define QEMU_SECCOMP_SET_SPAWN (1 << 3)#define QEMU_SECCOMP_SET_RESOURCECTL (1 << 4) -#include <seccomp.h> -int seccomp_start (uint32_t seccomp_opts);#endif
Signature · 1 line
2.13.5
Quoted 26 lines · Fam Zheng
The only prototype doesn't need anything from the lib header, and not including it here allows files that include this header, for example
vl.c, to compile without the libseccomp cflags.The breakage is since
c3883e1f93for environments where `pkg-config --cflags libseccomp" is non-empty.Reported-by Jan Kiszka <[email protected]>Signed-off-by Fam Zheng <[email protected]>---
This is an alternative for
https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg04470.html
([Qemu-devel] [PATCH] seccomp: Fix build)--- include/sysemu/seccomp.h | 2 -- 1 file changed, 2 deletions(-)include/sysemu/seccomp.h +0
-0
include/sysemu/seccomp.h line 25
Quoted 7 lines
include/sysemu/seccomp.h +0
-2@@ -21,7 +21,5 @@#define QEMU_SECCOMP_SET_SPAWN (1 << 3)#define QEMU_SECCOMP_SET_RESOURCECTL (1 << 4) -#include <seccomp.h> -int seccomp_start (uint32_t seccomp_opts);#endif
Works fine for me as well and is indeed cleaner.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux
Eduardo Otubo
Acked-byQuoted 10 lines · Jan Kiszka
Quoted 9 lines · Fam Zheng
The only prototype doesn't need anything from the lib header, and not including it here allows files that include this header, for example
vl.c, to compile without the libseccomp cflags.The breakage is since
c3883e1f93for environments where `pkg-config --cflags libseccomp" is non-empty.Reported-by Jan Kiszka <[email protected]>Signed-off-by Fam Zheng <[email protected]>
Quoted 32 lines
Quoted 17 lines
---
This is an alternative for
https://lists.gnu.org/archive/html/qemu-devel/2017-09/msg04470.html
([Qemu-devel] [PATCH] seccomp: Fix build)--- include/sysemu/seccomp.h | 2 -- 1 file changed, 2 deletions(-)include/sysemu/seccomp.h +0
-0include/sysemu/seccomp.h line 25
Quoted 7 lines
include/sysemu/seccomp.h +0
-2@@ -21,7 +21,5 @@#define QEMU_SECCOMP_SET_SPAWN (1 << 3)#define QEMU_SECCOMP_SET_RESOURCECTL (1 << 4) -#include <seccomp.h> -int seccomp_start (uint32_t seccomp_opts);#endif Works fine for me as well and is indeed cleaner.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux
Signature · 2 lines
Eduardo Otubo Senior Software Engineer @ RedHat
Quoted 6 lines · Eduardo Otubo
Quoted 5 lines · Jan Kiszka
Quoted 4 lines · Fam Zheng
The only prototype doesn't need anything from the lib header, and not including it here allows files that include this header, for example
vl.c, to compile without the libseccomp cflags.
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
The breakage is since
c3883e1f93for environments where `pkg-config --cflags libseccomp" is non-empty.Reported-by Jan Kiszka <[email protected]>Signed-off-by Fam Zheng <[email protected]>Acked-by Eduardo Otubo <[email protected]>
Thanks. Applied to master as a buildfix.
-- PMM