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