Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 84075:ef103e7e7af2 3.3
Ensure that the fix for #17269 also works on OSX 10.4
AI_NUMERICSERV isn't defined on OSX 10.4.
| author | Ronald Oussoren <ronaldoussoren@mac.com> |
|---|---|
| date | Mon, 10 Jun 2013 10:36:28 +0200 |
| parents | ffdee6b36305 |
| children | 9f8efcd78d0d 062f1985a5b7 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Sun Jun 09 21:08:05 2013 +0300 +++ b/Modules/socketmodule.c Mon Jun 10 10:36:28 2013 +0200 @@ -5041,7 +5041,7 @@ 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".
