]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Define CRYPT_LUKS in crypt-util.h
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 29 Nov 2017 14:06:53 +0000 (15:06 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 30 Nov 2017 19:43:25 +0000 (20:43 +0100)
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.

src/basic/crypt-util.h
src/cryptsetup/cryptsetup.c
src/shared/dissect-image.c

index e8e753275a3c870ba1673abb177d1de03e9dbe4e..537f785607979a89ed39efb34d854a1fbe085623 100644 (file)
 
 #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);
index 84bcdb467da99e7f79ef344ab6b85992d2ae0ab0..ab4d24ca3bc5bc50782c5a98b59f79bf5299e82c 100644 (file)
@@ -19,7 +19,6 @@
 ***/
 
 #include <errno.h>
-#include <libcryptsetup.h>
 #include <mntent.h>
 #include <string.h>
 #include <sys/mman.h>
 #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"
 
index 2714b3921cb7dd3ede37372473afebcefd781717..6f294ed0bf2e898fccc6b5b6fc369c4d41d6a461 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#if HAVE_LIBCRYPTSETUP
-#include <libcryptsetup.h>
-#ifndef CRYPT_LUKS
-#define CRYPT_LUKS NULL
-#endif
-#endif
-
 #include <sys/mount.h>
 #include <sys/prctl.h>
 #include <sys/wait.h>