diff options
author | Gregor Beck <gbeck@sernet.de> | 2014-03-26 09:30:24 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-03-31 22:52:12 +0200 |
commit | 465bb58fed360c6637c0731ef93ec8700a9a3726 (patch) | |
tree | 6ff5573e86f8c0d6c8c27fdc942b38a441929f20 /source3 | |
parent | 7667da659042d82d26bfdcbd79588a6b8e4e3edf (diff) | |
download | samba-465bb58fed360c6637c0731ef93ec8700a9a3726.tar.gz samba-465bb58fed360c6637c0731ef93ec8700a9a3726.tar.xz samba-465bb58fed360c6637c0731ef93ec8700a9a3726.zip |
s3:rpcclient: fix build without HAVE_IPV6
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpcclient/cmd_witness.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/source3/rpcclient/cmd_witness.c b/source3/rpcclient/cmd_witness.c index f9e4c9e17b..1812449c3a 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); |