diff --git a/meta-systemd/recipes-core/systemd/systemd/add-HAVE_XZ-check-to-avoid-build-failure.patch b/meta-systemd/recipes-core/systemd/systemd/add-HAVE_XZ-check-to-avoid-build-failure.patch
new file mode 100644
index 0000000..8e0bd45
--- /dev/null
+++ b/meta-systemd/recipes-core/systemd/systemd/add-HAVE_XZ-check-to-avoid-build-failure.patch
@@ -0,0 +1,32 @@
+commit 70f09301d5d47577cfa4fe70c7b3cba336529cdf
+Author: Yin Kangkai <kangkai.yin@intel.com>
+Date:   Fri Aug 24 16:52:58 2012 +0800
+
+    journal: add HAVE_XZ check to avoid build failure
+    
+    Without this, build fail with --disable-xz or xz not installed.
+
+    status: Applied upstream
+
+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));
+ 
diff --git a/meta-systemd/recipes-core/systemd/systemd_git.bb b/meta-systemd/recipes-core/systemd/systemd_git.bb
index 09bc635..95f4eee 100644
--- a/meta-systemd/recipes-core/systemd/systemd_git.bb
+++ b/meta-systemd/recipes-core/systemd/systemd_git.bb
@@ -27,6 +27,7 @@ SRCREV = "38a60d7112d33ffd596b23e8df53d75a7c09e71b"
 
 SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;protocol=git \
            file://use-rootlibdir.patch \
+           file://add-HAVE_XZ-check-to-avoid-build-failure.patch \
            file://gtk-doc.make \
            file://touchscreen.rules \
            file://modprobe.rules \
