summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2013-06-10 10:36:28 +0200
committerRonald Oussoren <ronaldoussoren@mac.com>2013-06-10 10:36:28 +0200
commita822d366750ea0817276f35fd3adcd894472a70a (patch)
treeb99012e0114acb7fcf5327e42cc36f87b1e21469 /Modules
parent6f50b810b78eaecff78bb7e2a3109d1cc672dbe0 (diff)
downloadcpython-git-a822d366750ea0817276f35fd3adcd894472a70a.tar.gz
Ensure that the fix for #17269 also works on OSX 10.4
AI_NUMERICSERV isn't defined on OSX 10.4.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/socketmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index b9579283f8..9b58a11bd5 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -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".