From 21676666589b22af876c1de15315d2d2ceaf06ca Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Mon, 14 Nov 2016 04:13:55 +0000 Subject: [PATCH] Issue #28000: Fix gethostbyname_r() usage on AIX with _LINUX_SOURCE_COMPAT Patch by Matthieu S. --- Misc/ACKS | 1 + Modules/socketmodule.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) 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 -- 2.47.3