From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acyLP-00079V-UD for qemu-devel@nongnu.org; Mon, 07 Mar 2016 11:49:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acyLL-0007hM-Tf for qemu-devel@nongnu.org; Mon, 07 Mar 2016 11:49:19 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:44927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acyLL-0007fu-Nu for qemu-devel@nongnu.org; Mon, 07 Mar 2016 11:49:15 -0500 Date: Mon, 7 Mar 2016 17:49:13 +0100 From: Samuel Thibault Message-ID: <20160307164913.GI5169@var.bordeaux.inria.fr> References: <56DD2430.2090509@redhat.com> <20160307115508.GJ5169@var.bordeaux.inria.fr> <56DDA057.2080107@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56DDA057.2080107@redhat.com> Subject: Re: [Qemu-devel] [PATCHv9 0/10] slirp: Adding IPv6 support to Qemu -net user mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: zhanghailiang , Li Zhijian , Stefan Hajnoczi , Jason Wang , Dave Gilbert , Vasiliy Tolstov , qemu-devel@nongnu.org, Gonglei , Jan Kiszka , Huangpeng , Guillaume Subiron Hello, Thomas Huth, on Mon 07 Mar 2016 16:37:59 +0100, wrote: > Is that "#include " required in ip6.h at all? It also seems > to compile if I omit that include completely here... Well, it makes sense to put it in ip6.h. That said, since ip6.h is only included through slirp.h which includes netinet/in.h appropriately, we can indeed drop it from ip6.h > Anyway, I just tried with my mingw32 cross-compiler, and once this is fixed, > compilation succeeds, but there are some warnings: > > net/slirp.c: In function 'net_slirp_init': > net/slirp.c:249:5: warning: implicit declaration of function 'inet_pton' [-Wimplicit-function-declaration] > if (!inet_pton(AF_INET6, vprefix6, &ip6_prefix)) { > ^ > slirp/ip6_icmp.c: In function 'icmp6_send_error': > slirp/ip6_icmp.c:84:5: warning: implicit declaration of function 'inet_ntop' [-Wimplicit-function-declaration] > inet_ntop(AF_INET6, &rip->ip_dst, addrstr, INET6_ADDRSTRLEN); > ^ > qemu/slirp/ndp_table.c: In function 'ndp_table_add': > qemu/slirp/ndp_table.c:16:5: warning: implicit declaration of function 'inet_ntop' [-Wimplicit-function-declaration] > inet_ntop(AF_INET6, &(ip_addr), addrstr, INET6_ADDRSTRLEN); > > The warnings go away when I use this piece of code in the beginning of the affected files: > > #ifdef _WIN32 > #define _WIN32_WINNT _WIN32_WINNT_WIN6 > #include > #endif Eeeww, so windows only provides inet_pton since Vista?! Ok, for now I'll just disable using inet_ntop/pton when built with compatibility before vista, i.e. notably #if defined(_WIN32) && (_WIN32_WINNT < 0x0600) hardcode fec0:: #endif and refuse to configure the prefix, host and dns. Samuel