Skip to content

Commit 301d2a5

Browse files
committed
termios: fixes for android, remove tcdrain function, not supported on that platform
1 parent bffaf4d commit 301d2a5

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
--- Python-2.7.2.orig/Modules/termios.c 2012-06-12 02:49:39.780162534 +0200
2+
+++ Python-2.7.2/Modules/termios.c 2012-06-12 02:51:52.092157828 +0200
3+
@@ -227,6 +227,7 @@
4+
return Py_None;
5+
}
6+
7+
+#if 0 // No tcdrain defined for Android.
8+
PyDoc_STRVAR(termios_tcdrain__doc__,
9+
"tcdrain(fd) -> None\n\
10+
\n\
11+
@@ -246,6 +247,7 @@
12+
Py_INCREF(Py_None);
13+
return Py_None;
14+
}
15+
+#endif
16+
17+
PyDoc_STRVAR(termios_tcflush__doc__,
18+
"tcflush(fd, queue) -> None\n\
19+
@@ -301,8 +303,10 @@
20+
METH_VARARGS, termios_tcsetattr__doc__},
21+
{"tcsendbreak", termios_tcsendbreak,
22+
METH_VARARGS, termios_tcsendbreak__doc__},
23+
+#if 0 // No tcdrain defined for Android.
24+
{"tcdrain", termios_tcdrain,
25+
METH_VARARGS, termios_tcdrain__doc__},
26+
+#endif
27+
{"tcflush", termios_tcflush,
28+
METH_VARARGS, termios_tcflush__doc__},
29+
{"tcflow", termios_tcflow,

recipes/python/recipe.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ function prebuild_python() {
2424
try patch -p1 < $RECIPE_python/patches/fix-gethostbyaddr.patch
2525
try patch -p1 < $RECIPE_python/patches/fix-setup-flags.patch
2626
try patch -p1 < $RECIPE_python/patches/fix-filesystemdefaultencoding.patch
27+
try patch -p1 < $RECIPE_python/patches/fix-termios.patch
2728
try patch -p1 < $RECIPE_python/patches/custom-loader.patch
2829
try patch -p1 < $RECIPE_python/patches/verbose-compilation.patch
2930

0 commit comments

Comments
 (0)