diff --git a/src/basic/crypt-util.h b/src/basic/crypt-util.h index e8e753275a..537f785607 100644 --- a/src/basic/crypt-util.h +++ b/src/basic/crypt-util.h @@ -23,6 +23,11 @@ #include "macro.h" +/* libcryptsetup define for any LUKS version, compatible with libcryptsetup 1.x */ +#ifndef CRYPT_LUKS +#define CRYPT_LUKS NULL +#endif + DEFINE_TRIVIAL_CLEANUP_FUNC(struct crypt_device *, crypt_free); void cryptsetup_log_glue(int level, const char *msg, void *usrptr); diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index 84bcdb467d..ab4d24ca3b 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -19,7 +19,6 @@ ***/ #include -#include #include #include #include @@ -40,11 +39,6 @@ #include "strv.h" #include "util.h" -/* libcryptsetup define for any LUKS version, compatible with libcryptsetup 1.x */ -#ifndef CRYPT_LUKS -#define CRYPT_LUKS NULL -#endif - /* internal helper */ #define ANY_LUKS "LUKS" diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 2714b3921c..6f294ed0bf 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -18,13 +18,6 @@ along with systemd; If not, see . ***/ -#if HAVE_LIBCRYPTSETUP -#include -#ifndef CRYPT_LUKS -#define CRYPT_LUKS NULL -#endif -#endif - #include #include #include