016-serial-ioctl-workaround.patch 809 B

123456789101112131415161718192021222324
  1. Serial ioctl() workaround
  2. The ioctls.h of some architectures (notably xtensa) references structs from
  3. linux/serial.h. Make sure to include this header as well.
  4. Also, undef TIOCTTYGSTRUCT that require reference to internal kernel tty_struct,
  5. but isn't actually referenced in modern kernels.
  6. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
  7. ---
  8. Index: b/Modules/termios.c
  9. ===================================================================
  10. --- a/Modules/termios.c
  11. +++ b/Modules/termios.c
  12. @@ -16,7 +16,9 @@
  13. * so this needs to be included first on that platform. */
  14. #include <termio.h>
  15. #endif
  16. +#include <linux/serial.h>
  17. #include <sys/ioctl.h>
  18. +#undef TIOCTTYGSTRUCT
  19. /* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,
  20. * MDTR, MRI, and MRTS (appearantly used internally by some things