Skip to content

Commit 81a8bf6

Browse files
authored
Merge pull request kivy#1581 from opacam/fix-python2-gethost
fix missing gethostbyname_r on Android 5.1
2 parents 95d41f7 + efa8b99 commit 81a8bf6

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

pythonforandroid/recipes/python2/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class Python2Recipe(GuestPythonRecipe):
2929
# is_api_lt(21)), # Todo: this should be tested
3030
'patches/fix-missing-extensions.patch',
3131
'patches/fix-filesystem-default-encoding.patch',
32+
'patches/fix-gethostbyaddr.patch',
3233
'patches/fix-posix-declarations.patch',
3334
'patches/fix-pwd-gecos.patch']
3435

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--- Python-2.7.15/Modules/socketmodule.c.orig 2017-12-29 01:40:09.915694810 +0100
2+
+++ Python-2.7.15/Modules/socketmodule.c 2017-12-29 01:40:36.967694486 +0100
3+
@@ -156,6 +156,9 @@
4+
On the other hand, not all Linux versions agree, so there the settings
5+
computed by the configure script are needed! */
6+
7+
+/* Android hack, same reason are what is described above */
8+
+#undef HAVE_GETHOSTBYNAME_R
9+
+
10+
#ifndef linux
11+
# undef HAVE_GETHOSTBYNAME_R_3_ARG
12+
# undef HAVE_GETHOSTBYNAME_R_5_ARG

0 commit comments

Comments
 (0)