diff options
author | Yin Kangkai <kangkai.yin@intel.com> | 2012-08-24 16:52:58 +0800 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-08-25 02:01:12 +0200 |
commit | 70f09301d5d47577cfa4fe70c7b3cba336529cdf (patch) | |
tree | 5ba714d8b321a1e96afbeaac194393dda191a46b /src | |
parent | 32f0eca017b0fb64cc6c04c62744e03f130d8a22 (diff) |
journal: add HAVE_XZ check to avoid build failure
Without this, build fail with --disable-xz or xz not installed.
Diffstat (limited to 'src')
-rw-r--r-- | 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 24012931d4..5d134bdb97 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)); |