summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-08-15 17:14:33 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-08-15 17:14:33 (GMT)
commitf95dd0a2986392d4f51bb1dd17db50ff40aa90d5 (patch)
tree9a8a9c569d68b7bbdfde292bd66a5b71fa62dc02 /Modules/socketmodule.c
parent834a85a235020379935418510c0043f08a08a2a5 (diff)
downloadcpython-f95dd0a2986392d4f51bb1dd17db50ff40aa90d5.zip
cpython-f95dd0a2986392d4f51bb1dd17db50ff40aa90d5.tar.gz
cpython-f95dd0a2986392d4f51bb1dd17db50ff40aa90d5.tar.bz2
Fix portability problems with glibc 2.0, as reported in #449157.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 16b81ac..525a19e 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -447,7 +447,11 @@ PyGAI_Err(int error)
if (error == EAI_SYSTEM)
return PySocket_Err();
+#ifdef HAVE_GAI_STRERROR
v = Py_BuildValue("(is)", error, gai_strerror(error));
+#else
+ v = Py_BuildValue("(is)", error, "getaddrinfo failed");
+#endif
if (v != NULL) {
PyErr_SetObject(PyGAI_Error, v);
Py_DECREF(v);