diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-08-06 09:55:25 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-08 15:41:37 +0100 |
commit | 5547f0e9e0c71c82d9bf87384bc81901117db030 (patch) | |
tree | 5ca5b682da025755789cf4870d55ca481d0e8fb6 /meta/recipes-devtools | |
parent | e25f7b5ca83d3f025ef2235f2ebd8233013eb406 (diff) | |
download | openembedded-core-contrib-5547f0e9e0c71c82d9bf87384bc81901117db030.tar.gz |
qemu: Fix build with glibc 2.36
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/qemu-7.0.0-glibc-2.36.patch | 46 |
2 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index 0db6701735..bcaa56bbba 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc @@ -27,6 +27,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \ file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \ file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \ + file://qemu-7.0.0-glibc-2.36.patch \ file://CVE-2022-35414.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" diff --git a/meta/recipes-devtools/qemu/qemu/qemu-7.0.0-glibc-2.36.patch b/meta/recipes-devtools/qemu/qemu/qemu-7.0.0-glibc-2.36.patch new file mode 100644 index 0000000000..abad1cfeeb --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/qemu-7.0.0-glibc-2.36.patch @@ -0,0 +1,46 @@ +Avoid conflicts between sys/mount.h and linux/mount.h that are seen +with glibc 2.36 + +Source: https://github.com/archlinux/svntogit-packages/blob/packages/qemu/trunk/qemu-7.0.0-glibc-2.36.patch + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -95,7 +95,25 @@ + #include <linux/soundcard.h> + #include <linux/kd.h> + #include <linux/mtio.h> ++ ++#ifdef HAVE_SYS_MOUNT_FSCONFIG ++/* ++ * glibc >= 2.36 linux/mount.h conflicts with sys/mount.h, ++ * which in turn prevents use of linux/fs.h. So we have to ++ * define the constants ourselves for now. ++ */ ++#define FS_IOC_GETFLAGS _IOR('f', 1, long) ++#define FS_IOC_SETFLAGS _IOW('f', 2, long) ++#define FS_IOC_GETVERSION _IOR('v', 1, long) ++#define FS_IOC_SETVERSION _IOW('v', 2, long) ++#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap) ++#define FS_IOC32_GETFLAGS _IOR('f', 1, int) ++#define FS_IOC32_SETFLAGS _IOW('f', 2, int) ++#define FS_IOC32_GETVERSION _IOR('v', 1, int) ++#define FS_IOC32_SETVERSION _IOW('v', 2, int) ++#else + #include <linux/fs.h> ++#endif + #include <linux/fd.h> + #if defined(CONFIG_FIEMAP) + #include <linux/fiemap.h> +--- a/meson.build ++++ b/meson.build +@@ -1686,6 +1686,8 @@ config_host_data.set('HAVE_OPTRESET', + cc.has_header_symbol('getopt.h', 'optreset')) + config_host_data.set('HAVE_IPPROTO_MPTCP', + cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP')) ++config_host_data.set('HAVE_SYS_MOUNT_FSCONFIG', ++ cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG')) + + # has_member + config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID', |