From: Martin Panter Date: Mon, 14 Nov 2016 04:13:55 +0000 (+0000) Subject: Issue #28000: Fix gethostbyname_r() usage on AIX with _LINUX_SOURCE_COMPAT X-Git-Tag: v2.7.13rc1~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21676666589b22af876c1de15315d2d2ceaf06ca;p=thirdparty%2FPython%2Fcpython.git Issue #28000: Fix gethostbyname_r() usage on AIX with _LINUX_SOURCE_COMPAT Patch by Matthieu S. --- diff --git a/Misc/ACKS b/Misc/ACKS index c6871145683b..65fd0dc07ab5 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1214,6 +1214,7 @@ Nick Russo James Rutherford Chris Ryland Constantina S. +Matthieu S Patrick Sabin Sébastien Sablé Suman Saha diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 75e07c1dc894..3e3c05f54079 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -167,12 +167,14 @@ shutdown(how) -- shut down traffic in one or both directions\n\ #endif #ifdef HAVE_GETHOSTBYNAME_R -# if defined(_AIX) || defined(__osf__) +# if defined(_AIX) && !defined(_LINUX_SOURCE_COMPAT) || defined(__osf__) # 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