[systemd-devel] [PATCH] journal: add HAVE_XZ check to avoid build failure

shawn shawnlandden at gmail.com
Fri Aug 24 09:27:11 PDT 2012


On Fri, 2012-08-24 at 16:52 +0800, Yin Kangkai wrote: 
> Without this, build fail if we --disable-xz or does not have xz installed in
> system.

we have the same thing with --disable-manpages and docbook-xslt 
> 
> Signed-off-by: Yin Kangkai <kangkai.yin at intel.com>
> ---
>  src/journal/journal-verify.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c
> index 2401293..5d134bd 100644
> --- a/src/journal/journal-verify.c
> +++ b/src/journal/journal-verify.c
> @@ -63,6 +63,7 @@ static int journal_file_object_verify(JournalFile *f, Object *o) {
>                  h1 = le64toh(o->data.hash);
>  
>                  if (o->object.flags & OBJECT_COMPRESSED) {
> +#ifdef HAVE_XZ
>                          void *b = NULL;
>                          uint64_t alloc = 0, b_size;
>  
> @@ -73,6 +74,9 @@ static int journal_file_object_verify(JournalFile *f, Object *o) {
>  
>                          h2 = hash64(b, b_size);
>                          free(b);
> +#else
> +                        return -EPROTONOSUPPORT;
> +#endif
>                  } else
>                          h2 = hash64(o->data.payload, le64toh(o->object.size) - offsetof(Object, data.payload));
>  


-- 
-Shawn Landden



More information about the systemd-devel mailing list