From: Zbigniew Jędrzejewski-Szmek Date: Wed, 29 Nov 2017 14:06:53 +0000 (+0100) Subject: Define CRYPT_LUKS in crypt-util.h X-Git-Tag: v236~81^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c116b0359509e00b0e868bd40459d05ff3b78469;p=thirdparty%2Fsystemd.git Define CRYPT_LUKS in crypt-util.h Also do not include libcryptsetup.h directly, but only through crypt-util.h. This way we do not have to repeat the define in every file where it is used. --- diff --git a/src/basic/crypt-util.h b/src/basic/crypt-util.h index e8e753275a3..537f7856079 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 84bcdb467da..ab4d24ca3bc 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 2714b3921cb..6f294ed0bf2 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