curl-library
Re: [bagder/curl] 78c25c: lib: Only define curl_dofreeaddrinfo if struct add...
Date: Sat, 28 Nov 2015 00:28:34 +0100
On Fri, Nov 27, 2015 at 11:12:55PM +0100, Daniel Stenberg wrote:
> On Fri, 27 Nov 2015, GitHub wrote:
>
> > Author: Dan Fandrich <dan_at_coneharvesters.com>
>
> > lib: Only define curl_dofreeaddrinfo if struct addrinfo is available
>
> Dan, what's the exact reason for this?
>
> The HAVE_GETADDRINFO is defined for when the libc function is detected and
> meant to be used. This commit makes c-ares build warnings/errors and I can
> fix that by removing the #undef HAVE_GETADDRINFO from the c-ares condition
> in lib/curl_setup.h but before I just go ahead and do that I wanted to
> understand your change better.
I found a combination of flags that caused 'struct addrinfo' to be disabled
for glibc, causing compilation failure of the prototype for curl_dogetaddrinfo.
I made the assumption that curl_dogetaddrinfo wouldn't be needed unless
curl_dogetaddrinfo or Curl_getaddrinfo_ex was available so commented it out
otherwise. Does c-ares *need* curl_dofreeaddrinfo, or is it failing elsewhere?
Maybe the c-ares section of curl_setup.h needs an #undef HAVE_FREEADDRINFO
added alongside the #undef HAVE_GETADDRINFO.
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-11-28