qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 0/5] ipv4-only and ipv6-only support


From: Samuel Thibault
Subject: Re: [Qemu-devel] [PULL 0/5] ipv4-only and ipv6-only support
Date: Thu, 31 Mar 2016 16:19:59 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Peter Maydell, on Thu 31 Mar 2016 15:11:27 +0100, wrote:
> On 31 March 2016 at 13:51, Samuel Thibault <address@hidden> wrote:
> > Peter Maydell, on Thu 31 Mar 2016 13:47:28 +0100, wrote:
> >> On 31 March 2016 at 10:20, Samuel Thibault <address@hidden> wrote:
> >> >   Update version for v2.6.0-rc0 release (2016-03-30 19:25:40 +0100)
> >> >
> >> > are available in the git repository at:
> >> >
> >> >   http://people.debian.org/~sthibault/qemu.git tags/samuel-thibault-2
> >> >
> >> > for you to fetch changes up to c99751f2a711e9eecf60901520c6d4197bdaf9b4:
> >> >
> >> >   slirp: Add RDNSS advertisement (2016-03-31 11:18:13 +0200)
> >> >
> >> > ----------------------------------------------------------------
> >> > slirp updates (2)
> >> >
> >> > ----------------------------------------------------------------
> >> > Samuel Thibault (5):
> >> >       slirp: Allow disabling IPv4 or IPv6
> >> >       slirp: Split get_dns_addr
> >> >       slirp: Add dns6 resolution
> >> >       slirp: Support link-local DNS addresses
> >> >       slirp: Add RDNSS advertisement
> >>
> >> Hi. I'm afraid this doesn't build for Windows:
> >
> > Indeed, I forgot to fix the the windows version of the function, could
> > you try with the attached change?
> 
> I'm afraid that's not sufficient:

Ah, this is using -Werror, OK, here are more fixes.

Samuel

diff --git a/slirp/libslirp.h b/slirp/libslirp.h
index 81bd139..b6fc584 100644
--- a/slirp/libslirp.h
+++ b/slirp/libslirp.h
@@ -7,7 +7,7 @@ struct Slirp;
 typedef struct Slirp Slirp;
 
 int get_dns_addr(struct in_addr *pdns_addr);
-int get_dns6_addr(struct in6_addr *pdns6_addr, unsigned *scope_id);
+int get_dns6_addr(struct in6_addr *pdns6_addr, uint32_t *scope_id);
 
 Slirp *slirp_init(int restricted, bool in_enabled, struct in_addr vnetwork,
                   struct in_addr vnetmask, struct in_addr vhost,
diff --git a/slirp/slirp.c b/slirp/slirp.c
index c6bcc6e..551a63c 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -46,9 +50,13 @@ static QTAILQ_HEAD(slirp_instances, Slirp) slirp_instances =
     QTAILQ_HEAD_INITIALIZER(slirp_instances);
 
 static struct in_addr dns_addr;
+#ifndef _WIN32
 static struct in6_addr dns6_addr;
+#endif
 static u_int dns_addr_time;
+#ifndef _WIN32
 static u_int dns6_addr_time;
+#endif
 
 #define TIMEOUT_FAST 2  /* milliseconds */
 #define TIMEOUT_SLOW 499  /* milliseconds */
@@ -110,7 +110,7 @@ int get_dns_addr(struct in_addr *pdns_addr)
     return 0;
 }
 
-int get_dns6_addr(struct in6_addr *pdns6_addr, unsigned *scope_id)
+int get_dns6_addr(struct in6_addr *pdns6_addr, uint32_t *scope_id)
 {
     return -1;
 }
@@ -146,7 +146,7 @@ static int get_dns_addr_cached(void *pdns_addr, void 
*cached_addr,
 }
 
 static int get_dns_addr_resolv_conf(int af, void *pdns_addr, void *cached_addr,
-                                    socklen_t addrlen, unsigned *scope_id,
+                                    socklen_t addrlen, uint32_t *scope_id,
                                     u_int *cached_time)
 {
     char buff[512];
@@ -229,7 +229,7 @@ int get_dns_addr(struct in_addr *pdns_addr)
                                     sizeof(dns_addr), NULL, &dns_addr_time);
 }
 
-int get_dns6_addr(struct in6_addr *pdns6_addr, unsigned *scope_id)
+int get_dns6_addr(struct in6_addr *pdns6_addr, uint32_t *scope_id)
 {
     static struct stat dns6_addr_stat;
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]