Blame SOURCES/volume_key-0.3.12-support_LUKS2_and_more.patch

e64f66
diff --git a/lib/volume_luks.c b/lib/volume_luks.c
e64f66
index f4bf2c8..d1c5d47 100644
e64f66
--- a/lib/volume_luks.c
e64f66
+++ b/lib/volume_luks.c
e64f66
@@ -30,6 +30,10 @@ Author: Miloslav Trmač <mitr@redhat.com> */
e64f66
 #include "volume.h"
e64f66
 #include "volume_luks.h"
e64f66
 
e64f66
+#ifndef CRYPT_LUKS
e64f66
+#define CRYPT_LUKS NULL
e64f66
+#endif
e64f66
+
e64f66
 /* LUKS - specific code */
e64f66
 
e64f66
 /* Return an error message for ERR_NO, for g_free (). */
e64f66
@@ -105,7 +109,7 @@ open_crypt_device (const char *path, char **last_log_entry, GError **error)
e64f66
   if (r < 0)
e64f66
     goto err;
e64f66
   crypt_set_log_callback(cd, record_cryptsetup_log_entry, last_log_entry);
e64f66
-  r = crypt_load (cd, CRYPT_LUKS1, NULL);
e64f66
+  r = crypt_load (cd, CRYPT_LUKS, NULL);
e64f66
   if (r < 0)
e64f66
     goto err_cd;
e64f66
   return cd;