summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-08-06 09:55:25 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-08 15:44:21 +0100
commit1f28ef830029740aba842d0f06567f66dc8dda70 (patch)
tree6d127da24e79091e9f636b3ed941603472669988 /meta/recipes-devtools/qemu/qemu
parentb7eec1ffa14ddc0170b01526253ba059a07840b6 (diff)
downloadpoky-1f28ef830029740aba842d0f06567f66dc8dda70.tar.gz
qemu: Fix build with glibc 2.36
(From OE-Core rev: 5547f0e9e0c71c82d9bf87384bc81901117db030) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu')
-rw-r--r--meta/recipes-devtools/qemu/qemu/qemu-7.0.0-glibc-2.36.patch46
1 files changed, 46 insertions, 0 deletions
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 @@
1Avoid conflicts between sys/mount.h and linux/mount.h that are seen
2with glibc 2.36
3
4Source: https://github.com/archlinux/svntogit-packages/blob/packages/qemu/trunk/qemu-7.0.0-glibc-2.36.patch
5
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8--- a/linux-user/syscall.c
9+++ b/linux-user/syscall.c
10@@ -95,7 +95,25 @@
11 #include <linux/soundcard.h>
12 #include <linux/kd.h>
13 #include <linux/mtio.h>
14+
15+#ifdef HAVE_SYS_MOUNT_FSCONFIG
16+/*
17+ * glibc >= 2.36 linux/mount.h conflicts with sys/mount.h,
18+ * which in turn prevents use of linux/fs.h. So we have to
19+ * define the constants ourselves for now.
20+ */
21+#define FS_IOC_GETFLAGS _IOR('f', 1, long)
22+#define FS_IOC_SETFLAGS _IOW('f', 2, long)
23+#define FS_IOC_GETVERSION _IOR('v', 1, long)
24+#define FS_IOC_SETVERSION _IOW('v', 2, long)
25+#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
26+#define FS_IOC32_GETFLAGS _IOR('f', 1, int)
27+#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
28+#define FS_IOC32_GETVERSION _IOR('v', 1, int)
29+#define FS_IOC32_SETVERSION _IOW('v', 2, int)
30+#else
31 #include <linux/fs.h>
32+#endif
33 #include <linux/fd.h>
34 #if defined(CONFIG_FIEMAP)
35 #include <linux/fiemap.h>
36--- a/meson.build
37+++ b/meson.build
38@@ -1686,6 +1686,8 @@ config_host_data.set('HAVE_OPTRESET',
39 cc.has_header_symbol('getopt.h', 'optreset'))
40 config_host_data.set('HAVE_IPPROTO_MPTCP',
41 cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP'))
42+config_host_data.set('HAVE_SYS_MOUNT_FSCONFIG',
43+ cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG'))
44
45 # has_member
46 config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID',