diff --git a/gost28147_basic.c b/gost28147_basic.c index f524519..4f08208 100644 --- a/gost28147_basic.c +++ b/gost28147_basic.c @@ -39,7 +39,11 @@ #include #include #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) #include +#else +#include +#endif #include "gost28147_int.h" #include "gost28147_param.h" diff --git a/gost28147_modes.c b/gost28147_modes.c index 993404b..c605fea 100644 --- a/gost28147_modes.c +++ b/gost28147_modes.c @@ -38,7 +38,11 @@ #include #include #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) #include +#else +#include +#endif #include "gost28147_int.h" struct crypto_gost28147_mode_ctx { diff --git a/gosthash94_generic.c b/gosthash94_generic.c index 876bd39..66630ab 100644 --- a/gosthash94_generic.c +++ b/gosthash94_generic.c @@ -29,9 +29,14 @@ #include #include +#include #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) #include +#else +#include +#endif #include #include diff --git a/kuznyechik_generic.c b/kuznyechik_generic.c index 5f48419..759c4a9 100644 --- a/kuznyechik_generic.c +++ b/kuznyechik_generic.c @@ -12,7 +12,11 @@ #include #include #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) #include +#else +#include +#endif #include #include diff --git a/magma_generic.c b/magma_generic.c index 85f13ba..af1fc07 100644 --- a/magma_generic.c +++ b/magma_generic.c @@ -11,7 +11,12 @@ #include #include +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) #include +#else +#include +#endif #include #include #include diff --git a/testmgr.c b/testmgr.c index 0917162..57756fe 100644 --- a/testmgr.c +++ b/testmgr.c @@ -32,8 +32,12 @@ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0) #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 13, 0) +MODULE_IMPORT_NS("CRYPTO_INTERNAL"); +#else MODULE_IMPORT_NS(CRYPTO_INTERNAL); -#endif +#endif // kernel >= 6.13 +#endif // kernel >= 5.12 #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) #define CRYPTO_TFM_REQ_FORBID_WEAK_KEYS CRYPTO_TFM_REQ_WEAK_KEY