summaryrefslogtreecommitdiff
path: root/lib/setup.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-01-12 23:13:19 +0100
committerDaniel Stenberg <daniel@haxx.se>2012-01-12 23:13:19 +0100
commit9f20379fe445d0994daa11d022270aea5ab99af6 (patch)
treeae270fbf9f829ef8161697c2239bd6333232faef /lib/setup.h
parent123c92c904b2f258ae69e211aa2663e80cb5429a (diff)
downloadcurl-9f20379fe445d0994daa11d022270aea5ab99af6.tar.gz
hostip: avoid getaddrinfo when c-ares is used
Some functions using getaddrinfo and gethostbyname were still mistakingly being used/linked even if c-ares was selected as resolver backend. Reported by: Arthur Murray Bug: http://curl.haxx.se/mail/lib-2012-01/0160.html
Diffstat (limited to 'lib/setup.h')
-rw-r--r--lib/setup.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/setup.h b/lib/setup.h
index f6e39d9ee..446c793c0 100644
--- a/lib/setup.h
+++ b/lib/setup.h
@@ -487,6 +487,9 @@
#ifdef USE_ARES
# define CURLRES_ASYNCH
# define CURLRES_ARES
+/* now undef the stock libc functions just to avoid them being used */
+# undef HAVE_GETADDRINFO
+# undef HAVE_GETHOSTBYNAME
#elif defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
# define CURLRES_ASYNCH
# define CURLRES_THREADED