diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-09-13 17:02:45 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2015-09-13 17:02:45 -0500 |
commit | 4238dc9cea6c543abf993d3a28af564f1c8dea0c (patch) | |
tree | b9e086742a3dfa56aa4772e2da5549ffbeb376dd /tdecore/tdehw | |
parent | 48efde854f382d44ce38c2a8d72233d3ff216428 (diff) | |
download | tdelibs-4238dc9cea6c543abf993d3a28af564f1c8dea0c.tar.gz tdelibs-4238dc9cea6c543abf993d3a28af564f1c8dea0c.zip |
Fix FTBFS when ancient versions of cryptsetup are used
Diffstat (limited to 'tdecore/tdehw')
-rw-r--r-- | tdecore/tdehw/tdestoragedevice.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/tdecore/tdehw/tdestoragedevice.cpp b/tdecore/tdehw/tdestoragedevice.cpp index 618a29c1b..781c08885 100644 --- a/tdecore/tdehw/tdestoragedevice.cpp +++ b/tdecore/tdehw/tdestoragedevice.cpp @@ -29,18 +29,22 @@ #include <tqpixmap.h> #include <tqfile.h> -#include "tdelocale.h" -#include "tdeglobal.h" -#include "kiconloader.h" -#include "tdetempfile.h" +#include "kdebug.h" +#include "tdelocale.h" +#include "tdeglobal.h" +#include "kiconloader.h" +#include "tdetempfile.h" #include "kstandarddirs.h" -#include "tdehardwaredevices.h" +#include "tdehardwaredevices.h" #include "config.h" #if defined(WITH_CRYPTSETUP) #include <libcryptsetup.h> + #ifndef CRYPT_SLOT_INACTIVE + #define CRYPTSETUP_OLD_API + #endif #endif // uDisks2 integration @@ -98,6 +102,9 @@ TDEDiskDeviceType::TDEDiskDeviceType TDEStorageDevice::diskType() { void TDEStorageDevice::internalGetLUKSKeySlotStatus() { #if defined(WITH_CRYPTSETUP) +#ifdef CRYPTSETUP_OLD_API + kdWarning() << "TDEStorageDevice: The version of libcryptsetup that TDE was compiled against was too old! Most LUKS features will not function" << endl; +#else unsigned int i; crypt_keyslot_info keyslot_status; TDELUKSKeySlotStatus::TDELUKSKeySlotStatus tde_keyslot_status; @@ -118,10 +125,14 @@ void TDEStorageDevice::internalGetLUKSKeySlotStatus() { m_cryptKeyslotStatus.append(tde_keyslot_status); } #endif +#endif } void TDEStorageDevice::internalInitializeLUKSIfNeeded() { #if defined(WITH_CRYPTSETUP) +#ifdef CRYPTSETUP_OLD_API + kdWarning() << "TDEStorageDevice: The version of libcryptsetup that TDE was compiled against was too old! Most LUKS features will not function" << endl; +#else int ret; if (m_diskType & TDEDiskDeviceType::LUKS) { @@ -158,6 +169,7 @@ void TDEStorageDevice::internalInitializeLUKSIfNeeded() { } } #endif +#endif } void TDEStorageDevice::cryptSetOperationsUnlockPassword(TQByteArray password) { |