diff Modules/socketmodule.c @ 84074:4d1e4bc6c5b5 2.7

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:35:36 +0200
parents f4981d8eb401
children
line wrap: on
line diff
--- a/Modules/socketmodule.c	Sun Jun 09 16:54:56 2013 +0300
+++ b/Modules/socketmodule.c	Mon Jun 10 10:35:36 2013 +0200
@@ -4179,7 +4179,7 @@
                         "getaddrinfo() argument 2 must be integer or string");
         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".