0002-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch 3.0 KB

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