diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-06-14 09:52:03 -0700 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-27 20:22:11 -0400 |
commit | d5ae7d902a40f26a8c26f4c6d300226689738716 (patch) | |
tree | 85c711404990dd5e37447cd7492c3017815790b7 /poky/meta/recipes-devtools/qemu/qemu/0014-fix-libcap-header-issue-on-some-distro.patch | |
parent | 0639c5b2c542e0ed9465cc9d8e5100ac0063038f (diff) | |
download | talos-openbmc-d5ae7d902a40f26a8c26f4c6d300226689738716.tar.gz talos-openbmc-d5ae7d902a40f26a8c26f4c6d300226689738716.zip |
Sumo refresh
Update external subtrees to latest Yocto sumo.
Change-Id: I8364f32bef079841c6e57f1c587f4b1bedf62fef
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-devtools/qemu/qemu/0014-fix-libcap-header-issue-on-some-distro.patch')
-rw-r--r-- | poky/meta/recipes-devtools/qemu/qemu/0014-fix-libcap-header-issue-on-some-distro.patch | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/poky/meta/recipes-devtools/qemu/qemu/0014-fix-libcap-header-issue-on-some-distro.patch b/poky/meta/recipes-devtools/qemu/qemu/0014-fix-libcap-header-issue-on-some-distro.patch new file mode 100644 index 000000000..b662a4150 --- /dev/null +++ b/poky/meta/recipes-devtools/qemu/qemu/0014-fix-libcap-header-issue-on-some-distro.patch @@ -0,0 +1,85 @@ +From 47fdb0b6e2e393194a8c81544c647fdd997aec7f Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Tue, 12 Mar 2013 09:54:06 +0800 +Subject: [PATCH] fix libcap header issue on some distro + +1, When build qemu-native on SLED 11.2, there is an error: +... +| In file included from /usr/include/bits/sigcontext.h:28, +| from /usr/include/signal.h:339, +| from /buildarea2/tmp/work/i686-linux/qemu-native/1.4.0-r0/ +qemu-1.4.0/include/qemu-common.h:42, +| from fsdev/virtfs-proxy-helper.c:23: +| /usr/include/asm/sigcontext.h:28: error: expected specifier- +qualifier-list before '__u64' +| /usr/include/asm/sigcontext.h:191: error: expected specifier- +qualifier-list before '__u64' +... + +2, The virtfs-proxy-helper.c includes <sys/capability.h> and +qemu-common.h in sequence. The header include map is: +(`-->' presents `include') +... +"virtfs-proxy-helper.c" --> <sys/capability.h> +... +"virtfs-proxy-helper.c" --> "qemu-common.h" --> <signal.h> --> +<bits/sigcontext.h> --> <asm/sigcontext.h> --> <linux/types.h> --> +<asm/types.h> --> <asm-generic/types.h> --> <asm-generic/int-ll64.h> +... + +3, The bug is found on SLED 11.2 x86. In libcap header file +/usr/include/sys/capability.h, it does evil stuff like this: +... + 25 /* + 26 * Make sure we can be included from userland by preventing + 27 * capability.h from including other kernel headers + 28 */ + 29 #define _LINUX_TYPES_H + 30 #define _LINUX_FS_H + 31 #define __LINUX_COMPILER_H + 32 #define __user + 33 + 34 typedef unsigned int __u32; + 35 typedef __u32 __le32; +... +This completely prevents including /usr/include/linux/types.h. +The above `<asm/sigcontext.h> --> <linux/types.h>' is prevented, +and '__u64' is defined in <asm-generic/int-ll64.h>. + +4, Modify virtfs-proxy-helper.c to include <sys/capability.h> +last to workaround the issue. + +http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html +http://patchwork.linuxtv.org/patch/12748/ + +Upstream-Status: Pending +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + fsdev/virtfs-proxy-helper.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c +index 8e48500..6490030 100644 +--- a/fsdev/virtfs-proxy-helper.c ++++ b/fsdev/virtfs-proxy-helper.c +@@ -13,7 +13,6 @@ + #include <sys/resource.h> + #include <getopt.h> + #include <syslog.h> +-#include <sys/capability.h> + #include <sys/fsuid.h> + #include <sys/vfs.h> + #include <sys/ioctl.h> +@@ -27,7 +26,11 @@ + #include "9p-iov-marshal.h" + #include "hw/9pfs/9p-proxy.h" + #include "fsdev/9p-iov-marshal.h" +- ++/* ++ * Include this one last due to some versions of it being buggy: ++ * http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html ++ */ ++#include <sys/capability.h> + #define PROGNAME "virtfs-proxy-helper" + + #ifndef XFS_SUPER_MAGIC |