summaryrefslogtreecommitdiff
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-11-14 04:26:36 +0000
committerMartin Panter <vadmium+py@gmail.com>2016-11-14 04:26:36 +0000
commitc9e08d8cb508aecaaa327ee1f27fe4164235f682 (patch)
tree246cd42e3163dc67133b7afbf1c0cdf27d1384c8 /Modules/socketmodule.c
parent9544a365bd47000b0d4c364808860365e6142a03 (diff)
downloadcpython-git-c9e08d8cb508aecaaa327ee1f27fe4164235f682.tar.gz
Issue #28000: Fix gethostbyname_r() usage on AIX with _LINUX_SOURCE_COMPAT
Patch by Matthieu S.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 3e1a460703..af6cc94415 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -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