0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. From e07973ca745958da739f8ece80273da48f94f031 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. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
  21. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
  22. Message-Id: <20230110174901.2580297-3-berrange@redhat.com>
  23. Signed-off-by: Laurent Vivier <laurent@vivier.eu>
  24. Upstream: https://gitlab.com/qemu-project/qemu/-/commit/6003159ce18faad4e1bc7bf9c85669019cd4950e
  25. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
  26. ---
  27. linux-user/syscall.c | 18 ------------------
  28. meson.build | 2 --
  29. 2 files changed, 20 deletions(-)
  30. diff --git a/linux-user/syscall.c b/linux-user/syscall.c
  31. index 10af5e0d8e..d974c76b60 100644
  32. --- a/linux-user/syscall.c
  33. +++ b/linux-user/syscall.c
  34. @@ -95,25 +95,7 @@
  35. #include <linux/soundcard.h>
  36. #include <linux/kd.h>
  37. #include <linux/mtio.h>
  38. -
  39. -#ifdef HAVE_SYS_MOUNT_FSCONFIG
  40. -/*
  41. - * glibc >= 2.36 linux/mount.h conflicts with sys/mount.h,
  42. - * which in turn prevents use of linux/fs.h. So we have to
  43. - * define the constants ourselves for now.
  44. - */
  45. -#define FS_IOC_GETFLAGS _IOR('f', 1, long)
  46. -#define FS_IOC_SETFLAGS _IOW('f', 2, long)
  47. -#define FS_IOC_GETVERSION _IOR('v', 1, long)
  48. -#define FS_IOC_SETVERSION _IOW('v', 2, long)
  49. -#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
  50. -#define FS_IOC32_GETFLAGS _IOR('f', 1, int)
  51. -#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
  52. -#define FS_IOC32_GETVERSION _IOR('v', 1, int)
  53. -#define FS_IOC32_SETVERSION _IOW('v', 2, int)
  54. -#else
  55. #include <linux/fs.h>
  56. -#endif
  57. #include <linux/fd.h>
  58. #if defined(CONFIG_FIEMAP)
  59. #include <linux/fiemap.h>
  60. diff --git a/meson.build b/meson.build
  61. index b88867ca9d..39e83bbafe 100644
  62. --- a/meson.build
  63. +++ b/meson.build
  64. @@ -2032,8 +2032,6 @@ config_host_data.set('HAVE_OPTRESET',
  65. cc.has_header_symbol('getopt.h', 'optreset'))
  66. config_host_data.set('HAVE_IPPROTO_MPTCP',
  67. cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP'))
  68. -config_host_data.set('HAVE_SYS_MOUNT_FSCONFIG',
  69. - cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG'))
  70. # has_member
  71. config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID',
  72. --
  73. 2.25.1