mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Fix portability problems with glibc 2.0, as reported in #449157.
This commit is contained in:
parent
834a85a235
commit
f95dd0a298
7 changed files with 23 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue