Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 1 | From e95c0a42940ca1cf763ca3374b36a9be030039d7 Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com> |
| 3 | Date: Tue, 10 Jan 2023 12:49:01 -0500 |
| 4 | Subject: [PATCH] Revert "linux-user: fix compat with glibc >= 2.36 |
| 5 | sys/mount.h" |
| 6 | MIME-Version: 1.0 |
| 7 | Content-Type: text/plain; charset=UTF-8 |
| 8 | Content-Transfer-Encoding: 8bit |
| 9 | |
| 10 | This reverts commit 3cd3df2a9584e6f753bb62a0028bd67124ab5532. |
| 11 | |
| 12 | glibc has fixed (in 2.36.9000-40-g774058d729) the problem |
| 13 | that caused a clash when both sys/mount.h annd linux/mount.h |
| 14 | are included, and backported this to the 2.36 stable release |
| 15 | too: |
| 16 | |
| 17 | https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E |
| 18 | |
| 19 | It is saner for QEMU to remove the workaround it applied for |
| 20 | glibc 2.36 and expect distros to ship the 2.36 maint release |
| 21 | with the fix. This avoids needing to add a further workaround |
| 22 | to QEMU to deal with the fact that linux/brtfs.h now also pulls |
| 23 | in linux/mount.h via linux/fs.h since Linux 6.1 |
| 24 | |
| 25 | Upstream-Status: Backport from v8.0 (master) |
| 26 | |
| 27 | Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> |
| 28 | Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> |
| 29 | Link: https://lore.kernel.org/r/20230110174901.2580297-3-berrange@redhat.com |
| 30 | Signed-off-by: Joel Stanley <joel@jms.id.au> |
| 31 | --- |
| 32 | linux-user/syscall.c | 18 ------------------ |
| 33 | meson.build | 2 -- |
| 34 | 2 files changed, 20 deletions(-) |
| 35 | |
| 36 | diff --git a/linux-user/syscall.c b/linux-user/syscall.c |
| 37 | index 510de8edc..13a67b84b 100644 |
| 38 | --- a/linux-user/syscall.c |
| 39 | +++ b/linux-user/syscall.c |
| 40 | @@ -95,25 +95,7 @@ |
| 41 | #include <linux/soundcard.h> |
| 42 | #include <linux/kd.h> |
| 43 | #include <linux/mtio.h> |
| 44 | - |
| 45 | -#ifdef HAVE_SYS_MOUNT_FSCONFIG |
| 46 | -/* |
| 47 | - * glibc >= 2.36 linux/mount.h conflicts with sys/mount.h, |
| 48 | - * which in turn prevents use of linux/fs.h. So we have to |
| 49 | - * define the constants ourselves for now. |
| 50 | - */ |
| 51 | -#define FS_IOC_GETFLAGS _IOR('f', 1, long) |
| 52 | -#define FS_IOC_SETFLAGS _IOW('f', 2, long) |
| 53 | -#define FS_IOC_GETVERSION _IOR('v', 1, long) |
| 54 | -#define FS_IOC_SETVERSION _IOW('v', 2, long) |
| 55 | -#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap) |
| 56 | -#define FS_IOC32_GETFLAGS _IOR('f', 1, int) |
| 57 | -#define FS_IOC32_SETFLAGS _IOW('f', 2, int) |
| 58 | -#define FS_IOC32_GETVERSION _IOR('v', 1, int) |
| 59 | -#define FS_IOC32_SETVERSION _IOW('v', 2, int) |
| 60 | -#else |
| 61 | #include <linux/fs.h> |
| 62 | -#endif |
| 63 | #include <linux/fd.h> |
| 64 | #if defined(CONFIG_FIEMAP) |
| 65 | #include <linux/fiemap.h> |
| 66 | diff --git a/meson.build b/meson.build |
| 67 | index e44432370..f37ba4114 100644 |
| 68 | --- a/meson.build |
| 69 | +++ b/meson.build |
| 70 | @@ -2032,8 +2032,6 @@ config_host_data.set('HAVE_OPTRESET', |
| 71 | cc.has_header_symbol('getopt.h', 'optreset')) |
| 72 | config_host_data.set('HAVE_IPPROTO_MPTCP', |
| 73 | cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP')) |
| 74 | -config_host_data.set('HAVE_SYS_MOUNT_FSCONFIG', |
| 75 | - cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG')) |
| 76 | |
| 77 | # has_member |
| 78 | config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID', |