0001-build-Fix-build-with-kernel-headers-from-linux-4-13.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. From 91123bb5201156e3d3adbe24305488f5eea2c8d7 Mon Sep 17 00:00:00 2001
  2. From: Christian Persch <chpe@src.gnome.org>
  3. Date: Mon, 27 Sep 2021 22:46:47 +0200
  4. Subject: [PATCH] build: Fix build with kernel headers from linux < 4.13
  5. We already support running with a kernel that doesn't support this
  6. ioctl, so let's also support building with one. Add the missing
  7. ioctl definition to missing.hh.
  8. Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/2514
  9. [Retrieved from:
  10. https://gitlab.gnome.org/GNOME/vte/-/commit/91123bb5201156e3d3adbe24305488f5eea2c8d7]
  11. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  12. ---
  13. src/missing.hh | 12 ++++++++++++
  14. 1 file changed, 12 insertions(+)
  15. diff --git a/src/missing.hh b/src/missing.hh
  16. index e5a58727..7902e41e 100644
  17. --- a/src/missing.hh
  18. +++ b/src/missing.hh
  19. @@ -23,11 +23,14 @@
  20. #include <fcntl.h>
  21. #ifdef __linux__
  22. +
  23. +#include <sys/ioctl.h>
  24. #include <sys/syscall.h>
  25. #if defined(__mips__) || defined(__mips64__)
  26. #include <asm/sgidefs.h>
  27. #endif
  28. +
  29. #endif
  30. /* NSIG isn't in POSIX, so if it doesn't exist use this here. See bug #759196 */
  31. @@ -128,4 +131,13 @@ char* strchrnul(char const* s,
  32. #define CLOSE_RANGE_CLOEXEC (1u << 2)
  33. #endif
  34. +#if !defined(TIOCGPTPEER)
  35. +/* See linux commit 54ebbfb1603415d9953c150535850d30609ef077 */
  36. +#if defined(__sparc__)
  37. +#define TIOCGPTPEER _IOR('t', 137, int)
  38. +#else
  39. +#define TIOCGPTPEER _IOR('T', 0x41, int)
  40. +#endif
  41. +#endif /* !TIOCGPTPEER */
  42. +
  43. #endif /* __linux__ */
  44. --
  45. GitLab