xref: /OK3568_Linux_fs/buildroot/package/python3/0008-Serial-ioctl-workaround.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom 9e6211b0d6d4610e5fb7d2c7e1152eb7c64d968b Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Baruch Siach <baruch@tkos.co.il>
3*4882a593SmuzhiyunDate: Wed, 23 Dec 2015 11:44:02 +0100
4*4882a593SmuzhiyunSubject: [PATCH] Serial ioctl() workaround
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunThe ioctls.h of some architectures (notably xtensa) references structs from
7*4882a593Smuzhiyunlinux/serial.h. Make sure to include this header as well.
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunAlso, undef TIOCTTYGSTRUCT that require reference to internal kernel tty_struct,
10*4882a593Smuzhiyunbut isn't actually referenced in modern kernels.
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunSigned-off-by: Baruch Siach <baruch@tkos.co.il>
13*4882a593Smuzhiyun---
14*4882a593Smuzhiyun Modules/termios.c | 2 ++
15*4882a593Smuzhiyun 1 file changed, 2 insertions(+)
16*4882a593Smuzhiyun
17*4882a593Smuzhiyundiff --git a/Modules/termios.c b/Modules/termios.c
18*4882a593Smuzhiyunindex 75e5e52320..eefbddfe69 100644
19*4882a593Smuzhiyun--- a/Modules/termios.c
20*4882a593Smuzhiyun+++ b/Modules/termios.c
21*4882a593Smuzhiyun@@ -15,7 +15,9 @@
22*4882a593Smuzhiyun #endif
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun #include <termios.h>
25*4882a593Smuzhiyun+#include <linux/serial.h>
26*4882a593Smuzhiyun #include <sys/ioctl.h>
27*4882a593Smuzhiyun+#undef TIOCTTYGSTRUCT
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun /* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,
30*4882a593Smuzhiyun  * MDTR, MRI, and MRTS (apparently used internally by some things
31*4882a593Smuzhiyun--
32*4882a593Smuzhiyun2.25.1
33*4882a593Smuzhiyun
34