[PATCH 2/5] Link against libdnsapi to avoid undefined reference

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Mar 21 19:52:00 GMT 2016

On Mar 21 15:45, Peter Foley wrote:
> On Mon, Mar 21, 2016 at 3:24 PM, Corinna Vinschen
> <corinna-cygwin@cygwin.com> wrote:
> > On Mar 21 13:15, Peter Foley wrote:
> >> /home/peter/cross/src/cygwin/winsup/cygwin/libc/minires-os-if.c:289:
> >> undefined reference to `DnsFree'
> >>
> >> winsup/cygwin/ChangeLog
> >> Makefile.in: Add libdnsapi to DLL_IMPORTS
> >
> > Apart from the fact that this is wrong and DnsFree should be added to
> > autoload.cc instead, what exactly is that patch fixing?  DnsFree isn't
> > used anywhere in Cygwin.
> This fixes the above link error when building cygwin0.dll as part of a
> cross toolchain.
> The issue appears to be caused by this change in the mingw headers.
> It probably won't show up for anybody not building against the latest
> git version of mingw untill the next release.
> https://github.com/mirror/mingw-w64/commit/38410a
> I assume this function should still be added to autoload.cc, rather
> then modifying DLL_IMPORTS.
> I'll take a look at that.

While you're at it, ideally we make ourselves independent of the MingW
header version and use DnsFree directly, replacing DnsRecordListFree
in autoload.cc and libc/minires-os-if.c, no?


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20160321/d25c92fa/attachment.sig>

More information about the Cygwin-patches mailing list