[PATCH] clitar: cope with functions of older versions of libarchive

Jeremy Allison jra at samba.org
Wed Dec 2 21:18:33 UTC 2015


On Wed, Dec 02, 2015 at 03:24:46PM +0100, Björn Jacke wrote:
> the feature of automatic decompression in extract mode is only supported in
> libarchive 3, so we use this only when available now.
> 
> The changed config checks for that also fix this bug:
> 
> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11296
> 
> Signed-off-by: Bjoern Jacke <bj at sernet.de>
> ---
>  source3/client/clitar.c | 10 ++++++++++
>  source3/wscript         |  8 ++++----
>  source3/wscript_build   |  3 ++-
>  3 files changed, 16 insertions(+), 5 deletions(-)
> 
> diff --git a/source3/client/clitar.c b/source3/client/clitar.c
> index b4f914f..8703f6b 100644
> --- a/source3/client/clitar.c
> +++ b/source3/client/clitar.c
> @@ -720,7 +720,11 @@ out_close:
>  		}
>  	}
>  out:
> +#ifdef HAVE_ARCHIVE_READ_FREE
>  	archive_write_free(t->archive);
> +#else
> +	archive_write_finish(t->archive);
> +#endif

Just one quick question - is the presence
of archive_write_free() gated on the presence
of archive_read_free() ?

Do we need to test for archive_write_free()
separately ?



More information about the samba-technical mailing list