0014-Serial-ioctl-workaround.patch 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. From 22e5a4c5d29ddf0856d7f68f5a613aec00e26168 Mon Sep 17 00:00:00 2001
  2. From: Baruch Siach <baruch@tkos.co.il>
  3. Date: Tue, 7 Mar 2017 22:25:36 +0100
  4. Subject: [PATCH] Serial ioctl() workaround
  5. The ioctls.h of some architectures (notably xtensa) references structs from
  6. linux/serial.h. Make sure to include this header as well.
  7. Also, undef TIOCTTYGSTRUCT that require reference to internal kernel tty_struct,
  8. but isn't actually referenced in modern kernels.
  9. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
  10. ---
  11. Modules/termios.c | 2 ++
  12. 1 file changed, 2 insertions(+)
  13. diff --git a/Modules/termios.c b/Modules/termios.c
  14. index 57f30dc..a8c9855 100644
  15. --- a/Modules/termios.c
  16. +++ b/Modules/termios.c
  17. @@ -16,7 +16,9 @@
  18. * so this needs to be included first on that platform. */
  19. #include <termio.h>
  20. #endif
  21. +#include <linux/serial.h>
  22. #include <sys/ioctl.h>
  23. +#undef TIOCTTYGSTRUCT
  24. /* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,
  25. * MDTR, MRI, and MRTS (appearantly used internally by some things
  26. --
  27. 2.7.4