014-serial-ioctl-workaround.patch 750 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. @@ -9,7 +9,9 @@
  13. #endif
  14. #include <termios.h>
  15. +#include <linux/serial.h>
  16. #include <sys/ioctl.h>
  17. +#undef TIOCTTYGSTRUCT
  18. /* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,
  19. * MDTR, MRI, and MRTS (appearantly used internally by some things