On Thu, 9 Jan 2014, Fabian Frank wrote:
... which it does because the 'hints' field in the thread_sync_data struct
only is present if HAVE_GETADDRINFO is defined!
Which IMHO makes sense, because only getaddrinfo accepts a hints parameter,
gethostbyname(_r) do not. FYI, I tested that TFTP (UDP) is still working
after applying my patch to always pass the hints and it does so on my Mac.
This was one concern for regression that I had.
Yes, but your patch doesn't work if libcurl is built on a system without
getaddrinfo() if I read the code correctly.
I would suggest a minor change:
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
index 4882c37..1f7a189 100644
--- a/lib/asyn-thread.c
+++ b/lib/asyn-thread.c
@@ -209,7 +209,7 @@ int init_thread_sync_data(struct thread_sync_data * tsd,
memset(tsd, 0, sizeof(*tsd));
tsd->port = port;
-#ifdef CURLRES_IPV6
+#ifdef HAVE_GETADDRINFO
DEBUGASSERT(hints);
tsd->hints = *hints;
#else
What do you think?
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html