chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32f0eca
)
journal: add HAVE_XZ check to avoid build failure
author
Yin Kangkai
<kangkai.yin@intel.com>
Fri, 24 Aug 2012 08:52:58 +0000
(16:52 +0800)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Sat, 25 Aug 2012 00:01:12 +0000
(
02:01
+0200)
Without this, build fail with --disable-xz or xz not installed.
src/journal/journal-verify.c
patch
|
blob
|
history
diff --git
a/src/journal/journal-verify.c
b/src/journal/journal-verify.c
index 24012931d456e6b82ad658206e2b7801d48ad0b6..5d134bdb9763d7c495f0c7708d40119b8b2d1835 100644
(file)
--- 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));