Message ID | 20160331141959.GP2636@var.bordeaux.inria.fr |
---|---|
State | New |
Headers | show |
On 31 March 2016 at 15:19, Samuel Thibault <samuel.thibault@gnu.org> wrote: > Peter Maydell, on Thu 31 Mar 2016 15:11:27 +0100, wrote: >> On 31 March 2016 at 13:51, Samuel Thibault <samuel.thibault@gnu.org> wrote: >> > Peter Maydell, on Thu 31 Mar 2016 13:47:28 +0100, wrote: >> >> On 31 March 2016 at 10:20, Samuel Thibault <samuel.thibault@ens-lyon.org> 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. Still nope: /home/petmay01/linaro/qemu-for-merges/slirp/socket.c: In function ‘sotranslate_out’: /home/petmay01/linaro/qemu-for-merges/slirp/socket.c:799:17: error: passing argument 2 of ‘get_dns6_addr’ from incompatible pointer type [-Werror] if (get_dns6_addr(&sin6->sin6_addr, &sin6->sin6_scope_id) < 0) { ^ In file included from /home/petmay01/linaro/qemu-for-merges/slirp/slirp.h:99:0, from /home/petmay01/linaro/qemu-for-merges/slirp/socket.c:10: /home/petmay01/linaro/qemu-for-merges/slirp/libslirp.h:10:5: note: expected ‘uint32_t *’ but argument is of type ‘u_long *’ int get_dns6_addr(struct in6_addr *pdns6_addr, uint32_t *scope_id); ^ cc1: all warnings being treated as errors thanks -- PMM
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;