]> granicus.if.org Git - python/commitdiff
Issue #28000: Fix gethostbyname_r() usage on AIX with _LINUX_SOURCE_COMPAT
authorMartin Panter <vadmium+py@gmail.com>
Mon, 14 Nov 2016 04:26:36 +0000 (04:26 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Mon, 14 Nov 2016 04:26:36 +0000 (04:26 +0000)
Patch by Matthieu S.

Misc/ACKS
Modules/socketmodule.c

index 0a4e02e65a7d7a333c109cce76535cbb347dab0a..69dc9f5c0dffb4c2ab0dd19b4e46b6fe7b509432 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1290,6 +1290,7 @@ James Rutherford
 Chris Ryland
 Bernt Røskar Brenna
 Constantina S.
+Matthieu S
 Patrick Sabin
 Sébastien Sablé
 Suman Saha
index 3e1a460703261eafa93b6afa0cd820fad0932135..af6cc94415b6869d0b37e22bd6cc2d5b514348b0 100644 (file)
@@ -168,12 +168,14 @@ if_indextoname(index) -- return the corresponding interface name\n\
 #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