[PATCH] some fixes for waf issues

Michael Adam obnox at samba.org
Mon Mar 31 09:11:45 MDT 2014


Looks good to me.

==> Reviewed-by: Michael Adam <obnox at samba.org>

Cheers - Michael

On 2014-03-26 at 10:06 +0100, Gregor Beck wrote:
> Hi Ambi,
> 
> Am Montag, 3. März 2014, 21:51:12 schrieb Christian Ambach:
> > Seems like that is a HAVE_IPV6 define missing in the code
> > that was added with
> > 8e4a786 gbeck at sernet.de s3:rpcclient: add witness command
> > 
> > Gregor, would you have a look at this please?
> Sorry, missed your mail right before vacation.
> 
> Gregor
> 
> 
> -- 
> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
> phone: +49-551-370000-0, fax: +49-551-370000-9
> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
> http://www.sernet.de, mailto:kontakt at sernet.de

> >From 6afaf88a9461326d039973e62f801fc9db64cfb1 Mon Sep 17 00:00:00 2001
> From: Gregor Beck <gbeck at sernet.de>
> Date: Wed, 26 Mar 2014 09:30:24 +0100
> Subject: [PATCH] s3:rpcclient: fix build without HAVE_IPV6
> 
> Signed-off-by: Gregor Beck <gbeck at sernet.de>
> ---
>  source3/rpcclient/cmd_witness.c |   19 ++++++++++++++-----
>  1 file changed, 14 insertions(+), 5 deletions(-)
> 
> diff --git a/source3/rpcclient/cmd_witness.c b/source3/rpcclient/cmd_witness.c
> index f9e4c9e..1812449 100644
> --- a/source3/rpcclient/cmd_witness.c
> +++ b/source3/rpcclient/cmd_witness.c
> @@ -366,8 +366,7 @@ static bool AsyncNotify_Move(TALLOC_CTX *mem_ctx, const uint8_t **ptr)
>  	for (n=0; n<num; n++) {
>  		uint32_t flags = IVAL(pos,0);
>  		struct in_addr ipv4;
> -		struct in6_addr ipv6;
> -		struct sockaddr_storage sas4, sas6;
> +		struct sockaddr_storage sas4;
>  		char *str4, *str6;
>  		pos += 4;
>  
> @@ -376,9 +375,19 @@ static bool AsyncNotify_Move(TALLOC_CTX *mem_ctx, const uint8_t **ptr)
>  		str4 = print_canonical_sockaddr(mem_ctx, &sas4);
>  		pos += 4;
>  
> -		memcpy(&ipv6.s6_addr, pos, 16);
> -		in6_addr_to_sockaddr_storage(&sas6, ipv6);
> -		str6 = print_canonical_sockaddr(mem_ctx, &sas6);
> +		{
> +#ifdef HAVE_IPV6
> +			struct in6_addr ipv6;
> +			struct sockaddr_storage sas6;
> +
> +			memcpy(&ipv6.s6_addr, pos, 16);
> +			in6_addr_to_sockaddr_storage(&sas6, ipv6);
> +			str6 = print_canonical_sockaddr(mem_ctx, &sas6);
> +#else
> +			DATA_BLOB ipv6 = data_blob(pos, 16);
> +			str6 = data_blob_hex_string_upper(mem_ctx, &ipv6);
> +#endif
> +		}
>  		pos += 16;
>  
>  		d_printf("Flags 0x%08x", flags);
> -- 
> 1.7.9.5
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 215 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140331/98c699c9/attachment.pgp>


More information about the samba-technical mailing list