[Python-checkins] cpython (3.5): Issue #28000: Fix gethostbyname_r() usage on AIX with _LINUX_SOURCE_COMPAT

martin.panter python-checkins at python.org
Mon Nov 14 00:39:11 EST 2016


https://hg.python.org/cpython/rev/7598e65a924e
changeset:   105096:7598e65a924e
branch:      3.5
parent:      105094:a2ba15f05ed1
user:        Martin Panter <vadmium+py at gmail.com>
date:        Mon Nov 14 04:26:36 2016 +0000
summary:
  Issue #28000: Fix gethostbyname_r() usage on AIX with _LINUX_SOURCE_COMPAT

Patch by Matthieu S.

files:
  Misc/ACKS              |  1 +
  Modules/socketmodule.c |  4 +++-
  2 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1290,6 +1290,7 @@
 Chris Ryland
 Bernt Røskar Brenna
 Constantina S.
+Matthieu S
 Patrick Sabin
 Sébastien Sablé
 Suman Saha
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -168,12 +168,14 @@
 #endif
 
 #ifdef HAVE_GETHOSTBYNAME_R
-# if defined(_AIX)
+# if defined(_AIX) && !defined(_LINUX_SOURCE_COMPAT)
 #  define HAVE_GETHOSTBYNAME_R_3_ARG
 # elif defined(__sun) || defined(__sgi)
 #  define HAVE_GETHOSTBYNAME_R_5_ARG
 # elif defined(linux)
 /* Rely on the configure script */
+# elif defined(_LINUX_SOURCE_COMPAT) /* Linux compatibility on AIX */
+#  define HAVE_GETHOSTBYNAME_R_6_ARG
 # else
 #  undef HAVE_GETHOSTBYNAME_R
 # endif

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list