diff --git a/engines/afalg/e_afalg.c b/engines/afalg/e_afalg.c index 830e88b302..d8599a165b 100644 --- a/engines/afalg/e_afalg.c +++ b/engines/afalg/e_afalg.c @@ -69,6 +69,9 @@ #if LINUX_VERSION_CODE <= KERNEL_VERSION(K_MAJ, K_MIN1, K_MIN2) # warning "AFALG ENGINE requires Kernel Headers >= 4.1.0" # warning "Skipping Compilation of AFALG engine" +void engine_load_afalg_int(void) +{ +} #else # include diff --git a/test/afalgtest.c b/test/afalgtest.c index 16916b3fd7..80aa1e7550 100644 --- a/test/afalgtest.c +++ b/test/afalgtest.c @@ -54,6 +54,22 @@ #include #include +#ifndef OPENSSL_NO_AFALGENG +# include +# define K_MAJ 4 +# define K_MIN1 1 +# define K_MIN2 0 +# if LINUX_VERSION_CODE <= KERNEL_VERSION(K_MAJ, K_MIN1, K_MIN2) +/* + * If we get here then it looks like there is a mismatch between the linux + * headers and the actual kernel version, so we have tried to compile with + * afalg support, but then skipped it in e_afalg.c. As far as this test is + * concerned we behave as if we had been configured without support + */ +# define OPENSSL_NO_AFALGENG +# endif +#endif + #ifndef OPENSSL_NO_AFALGENG #include #include