This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add IPv6 support for remote TCP connections
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: fercerpav at gmail dot com, gdb-patches at sourceware dot org, ktietz at redhat dot com
- Date: Sun, 09 Feb 2014 18:34:28 +0200
- Subject: Re: [PATCH] Add IPv6 support for remote TCP connections
- Authentication-results: sourceware.org; auth=none
- References: <1391878435-19340-1-git-send-email-fercerpav at gmail dot com> <20140209083056 dot GA32481 at host2 dot jankratochvil dot net> <20140209095308 dot GH2320 at home dot lan> <20140209130501 dot GA15183 at host2 dot jankratochvil dot net>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Sun, 9 Feb 2014 14:05:01 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: gdb-patches@sourceware.org, Kai Tietz <ktietz@redhat.com>
>
> On Sun, 09 Feb 2014 10:53:08 +0100, Paul Fertser wrote:
> > Do you take into account that there're currently two competing
> > solutions for providing windows support: MinGW and MinGW-w64?
>
> Yes, recent Fedoras AFAIK follow the MinGW-w64 port:
> https://fedoraproject.org/wiki/MinGW?rd=SIGs/MinGW
> https://fedoraproject.org/wiki/MinGW/CrossCompilerFramework
> http://mingw-w64.sourceforge.net/
>
>
> > I've just tried cross-compiling code with getaddrinfo with mingw-w64
> > without any replacements and it was built (and run with wine) just
> > fine.
>
> I have different results for gdb-7.7 with your patch on Fedora Rawhide
> (=F-21pre) x86_64:
>
> ../../gdb/ser-tcp.c: In function 'net_open':
> ../../gdb/ser-tcp.c:162:19: error: storage size of 'hints' isn't known
> struct addrinfo hints;
> ^
> ../../gdb/ser-tcp.c:196:30: error: invalid application of 'sizeof' to incomplete type 'struct addrinfo'
> memset (&hints, 0, sizeof (struct addrinfo));
> ^
> ../../gdb/ser-tcp.c:205:3: warning: implicit declaration of function 'getaddrinfo' [-Wimplicit-function-declaration]
> tmp = getaddrinfo (hostname, port_str, &hints, &result);
> ^
> [...]
Did you include ws2tcpip.h? That's the header where getaddrinfo and
all that is needed to use it are declared, per the MSDN documentation:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms738520%28v=vs.85%29.aspx