[dm-crypt] Building error

Milan Broz gmazyland at gmail.com
Wed Aug 8 11:39:56 CEST 2012

On 08/08/2012 11:10 AM, demo demo wrote:
> Hi,
> My goal is to manage crypted devices using own C program which should include and use Cryptsetup API.
> In order to start I'm first trying to build the example files but I got the following error:
> # make
> gcc -O0 -g -Wall -D_GNU_SOURCE   -c -o crypt_luks_usage.o crypt_luks_usage.c
> crypt_luks_usage.c: In function ‘format_and_add_keyslots’:
> crypt_luks_usage.c:85: error: ‘struct crypt_params_luks1’ has no member named ‘data_device’
> make: *** [crypt_luks_usage.o] Error 1
> It's on CentOS 6.2, cryptsetup 1.2.0

The example is taken from more recent version of cryptsetup source (data_device was introduced later).

Whatever, in this example just comment out this line setting data_device to NULL
and it will work even int RHEL6.

(I will perhaps remove it upstream as well so the basic example compiles even on older versions of library.)


More information about the dm-crypt mailing list