This patch should work : --- gost-crypto-0.3.5/gost28147_basic.c 2023-06-24 00:31:16.000000000 +0200 +++ gost-crypto-0.3.6/gost28147_basic.c 2024-12-14 00:31:16.000000000 +0200 @@ -39,7 +39,13 @@ #include <linux/crypto.h> #include <linux/version.h> #include <asm/byteorder.h> + +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) #include <asm/unaligned.h> +#else +#include <linux/unaligned.h> +#endif + #include "gost28147_int.h" #include "gost28147_param.h"
--- gost-crypto-0.3.5/gost28147_modes.c 2023-06-24 00:31:16.000000000 +0200 +++ gost-crypto-0.3.6/gost28147_modes.c 2024-12-14 00:31:16.000000000 +0200 @@ -38,7 +38,13 @@ #include <linux/crypto.h> #include <linux/version.h> #include <asm/byteorder.h> + +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) #include <asm/unaligned.h> +#else +#include <linux/unaligned.h> +#endif + #include "gost28147_int.h" struct crypto_gost28147_mode_ctx { --- gost-crypto-0.3.5/gosthash94_generic.c 2023-06-24 00:31:16.000000000 +0200 +++ gost-crypto-0.3.6/gosthash94_generic.c 2024-12-14 00:31:16.000000000 +0200 @@ -29,9 +29,15 @@ #include <linux/crypto.h> #include <linux/module.h> +#include <linux/version.h> #include <asm/byteorder.h> + +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) #include <asm/unaligned.h> +#else +#include <linux/unaligned.h> +#endif #include <crypto/internal/hash.h> #include <crypto/gost28147.h> --- gost-crypto-0.3.5/kuznyechik_generic.c 2023-06-24 00:31:16.000000000 +0200 +++ gost-crypto-0.3.6/kuznyechik_generic.c 2024-12-14 00:31:16.000000000 +0200 @@ -12,7 +12,12 @@ #include <linux/crypto.h> #include <linux/module.h> #include <linux/version.h> + +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) #include <asm/unaligned.h> +#else +#include <linux/unaligned.h> +#endif #include <crypto/algapi.h> #include <crypto/kuznyechik.h> --- gost-crypto-0.3.5/magma_generic.c 2023-06-24 00:31:16.000000000 +0200 +++ gost-crypto-0.3.6/magma_generic.c 2024-12-14 00:31:16.000000000 +0200 @@ -11,7 +11,14 @@ #include <linux/crypto.h> #include <linux/module.h> +#include <linux/version.h> + +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) #include <asm/unaligned.h> +#else +#include <linux/unaligned.h> +#endif + #include <crypto/algapi.h> #include <crypto/magma.h> #include <crypto/gost28147.h>