mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Ensure that the fix for #17269 also works on OSX 10.4
AI_NUMERICSERV isn't defined on OSX 10.4.
This commit is contained in:
parent
6f50b810b7
commit
a822d36675
2 changed files with 3 additions and 2 deletions
|
@ -5041,7 +5041,7 @@ socket_getaddrinfo(PyObject *self, PyObject *args, PyObject* kwargs)
|
|||
PyErr_SetString(PyExc_OSError, "Int or String expected");
|
||||
goto err;
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) && defined(AI_NUMERICSERV)
|
||||
if ((flags & AI_NUMERICSERV) && (pptr == NULL || (pptr[0] == '0' && pptr[1] == 0))) {
|
||||
/* On OSX upto at least OSX 10.8 getaddrinfo crashes
|
||||
* if AI_NUMERICSERV is set and the servname is NULL or "0".
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue