summaryrefslogtreecommitdiffstats
path: root/src/partition
diff options
context:
space:
mode:
authorMarcus Harrison <marcus@harrisonland.co.uk>2021-09-15 03:55:07 +0200
committerGitHub <noreply@github.com>2021-09-15 03:55:07 +0200
commit2709d02906dd3ab5ecc2b3e19e2846b1714a7e5a (patch)
tree4c912c96d30e1087b3339725cc9bfb301a5a24b8 /src/partition
parentpo: Translated using Weblate (Finnish) (diff)
downloadsystemd-2709d02906dd3ab5ecc2b3e19e2846b1714a7e5a.tar.xz
systemd-2709d02906dd3ab5ecc2b3e19e2846b1714a7e5a.zip
Fix error building repart with no libcryptsetup (#20739)
Diffstat (limited to 'src/partition')
-rw-r--r--src/partition/repart.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c
index bf6bac07c5..72cb7eab97 100644
--- a/src/partition/repart.c
+++ b/src/partition/repart.c
@@ -206,7 +206,12 @@ static const char *encrypt_mode_table[_ENCRYPT_MODE_MAX] = {
[ENCRYPT_KEY_FILE_TPM2] = "key-file+tpm2",
};
+#if HAVE_LIBCRYPTSETUP
DEFINE_PRIVATE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(encrypt_mode, EncryptMode, ENCRYPT_KEY_FILE);
+#else
+DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING_WITH_BOOLEAN(encrypt_mode, EncryptMode, ENCRYPT_KEY_FILE);
+#endif
+
static uint64_t round_down_size(uint64_t v, uint64_t p) {
return (v / p) * p;