[Python-checkins] cpython: Issue #26857: The gethostbyaddr_r() workaround is no longer needed with
stefan.krah
python-checkins at python.org
Sun May 22 11:36:13 EDT 2016
https://hg.python.org/cpython/rev/09af54099973
changeset: 101477:09af54099973
parent: 101475:bd67fd3eb42e
user: Stefan Krah <skrah at bytereef.org>
date: Sun May 22 17:35:34 2016 +0200
summary:
Issue #26857: The gethostbyaddr_r() workaround is no longer needed with
api-level >= 23. Patch by Xavier de Gaye.
files:
Include/pyport.h | 4 ++++
Modules/socketmodule.c | 6 +++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/Include/pyport.h b/Include/pyport.h
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -897,4 +897,8 @@
#endif /* _MSC_VER >= 1900 */
#endif /* Py_BUILD_CORE */
+#ifdef __ANDROID__
+#include <android/api-level.h>
+#endif
+
#endif /* Py_PYPORT_H */
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -163,7 +163,11 @@
# include <sys/uio.h>
#endif
-#if !defined(WITH_THREAD) || defined(__ANDROID__)
+#if !defined(WITH_THREAD)
+# undef HAVE_GETHOSTBYNAME_R
+#endif
+
+#if defined(__ANDROID__) && __ANDROID_API__ < 23
# undef HAVE_GETHOSTBYNAME_R
#endif
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list