]> granicus.if.org Git - python/commitdiff
Temporarily work around bug #445928: Force usage of getaddrinfo emulation
authorMartin v. Löwis <martin@v.loewis.de>
Mon, 30 Jul 2001 16:52:55 +0000 (16:52 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Mon, 30 Jul 2001 16:52:55 +0000 (16:52 +0000)
code on Darwin, since the C library version of that seems to be broken.

Modules/socketmodule.c

index d33e1902c4917e1b3f9568f2359bf8e08806e83a..16b08526346f3b29d97e17d1a4a0ce5dade5f595 100644 (file)
@@ -219,10 +219,14 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
 #endif
 
 /* I know this is a bad practice, but it is the easiest... */
-#ifndef HAVE_GETADDRINFO
+/* XXX Temporarily work around bug #445928:
+   getaddrinfo on Darwin seems to return an empty result list, with
+   no error, even if host lookup ought to work fine. So use the
+   emulation code for now. */
+#if !defined(HAVE_GETADDRINFO) || defined(__APPLE__)
 #include "getaddrinfo.c"
 #endif
-#ifndef HAVE_GETNAMEINFO
+#if !defined(HAVE_GETNAMEINFO) || defined(__APPLE__)
 #include "getnameinfo.c"
 #endif