summaryrefslogtreecommitdiff
path: root/src/journal/journal-file.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-11 10:42:06 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-11 10:42:27 -0400
commit3b1a55e110ab387a8d213581983e20c0a63d7894 (patch)
tree972b5eca785f511c41d96a3f14b172c5f9180b5f /src/journal/journal-file.c
parent6017365a1d0c1c78fc34a7da63768ee5df5da511 (diff)
Fix build without any compression enabled
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r--src/journal/journal-file.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index d3535d2fad..dc041dd58a 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -819,6 +819,7 @@ int journal_file_find_data_object_with_hash(
goto next;
if (o->object.flags & OBJECT_COMPRESSION_MASK) {
+#if defined(HAVE_XZ) || defined(HAVE_LZ4)
uint64_t l, rsize;
l = le64toh(o->object.size);
@@ -843,7 +844,9 @@ int journal_file_find_data_object_with_hash(
return 1;
}
-
+#else
+ return -EPROTONOSUPPORT;
+#endif
} else if (le64toh(o->object.size) == osize &&
memcmp(o->data.payload, data, size) == 0) {
@@ -2772,6 +2775,7 @@ int journal_file_copy_entry(JournalFile *from, JournalFile *to, Object *o, uint6
return -E2BIG;
if (o->object.flags & OBJECT_COMPRESSION_MASK) {
+#if defined(HAVE_XZ) || defined(HAVE_LZ4)
uint64_t rsize;
r = decompress_blob(o->object.flags & OBJECT_COMPRESSION_MASK,
@@ -2781,6 +2785,9 @@ int journal_file_copy_entry(JournalFile *from, JournalFile *to, Object *o, uint6
data = from->compress_buffer;
l = rsize;
+#else
+ return -EPROTONOSUPPORT;
+#endif
} else
data = o->data.payload;