1From 0061a02bbe82c9b3b631d3b820bab0ba18482ebc Mon Sep 17 00:00:00 2001
2From: Baruch Siach <baruch@tkos.co.il>
3Date: Wed, 23 Dec 2015 11:44:02 +0100
4Subject: [PATCH] Serial ioctl() workaround
5
6The ioctls.h of some architectures (notably xtensa) references structs from
7linux/serial.h. Make sure to include this header as well.
8
9Also, undef TIOCTTYGSTRUCT that require reference to internal kernel tty_struct,
10but isn't actually referenced in modern kernels.
11
12Signed-off-by: Baruch Siach <baruch@tkos.co.il>
13---
14 Modules/termios.c | 2 ++
15 1 file changed, 2 insertions(+)
16
17diff --git a/Modules/termios.c b/Modules/termios.c
18index 23771b2ce99..c1579af435d 100644
19--- a/Modules/termios.c
20+++ b/Modules/termios.c
21@@ -15,7 +15,9 @@
22 #endif
23
24 #include <termios.h>
25+#include <linux/serial.h>
26 #include <sys/ioctl.h>
27+#undef TIOCTTYGSTRUCT
28
29 /* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,
30  * MDTR, MRI, and MRTS (apparently used internally by some things
31--
322.44.0
33
34