Fix definitions of slot constants for old cryptsetup API.

This resolves issue #137.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/138/head
Slávek Banko 4 years ago
parent f23ac74e05
commit ac7e0fac53
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -798,7 +798,7 @@ if( WITH_CRYPTSETUP )
check_c_source_compiles("
#include <stddef.h>
#include <libcryptsetup.h>
int main(int argc, char *argv[]) { crypt_keyslot_info status = CRYPT_SLOT_INVALID; return 0; } "
int main(int argc, char *argv[]) { crypt_keyslot_info status = CRYPT_SLOT_ACTIVE; return 0; } "
HAVE_NEW_CRYPTSETUP )
check_c_source_compiles("
#include <stddef.h>

@ -43,11 +43,9 @@
#if defined(WITH_CRYPTSETUP)
#ifdef CRYPTSETUP_OLD_API
#define class cryptsetup_class
#define CRYPT_SLOT_INVALID INVALID
#define CRYPT_SLOT_INACTIVE INACTIVE
#define CRYPT_SLOT_ACTIVE ACTIVE
#define CRYPT_SLOT_BUSY BUSY
#define CRYPT_SLOT_ACTIVE_LAST ACTIVE
#define CRYPT_SLOT_INACTIVE SLOT_INACTIVE
#define CRYPT_SLOT_ACTIVE SLOT_ACTIVE
#define CRYPT_SLOT_ACTIVE_LAST SLOT_ACTIVE_LAST
#include <libcryptsetup.h>
#undef class
#else

Loading…
Cancel
Save