ktf icon indicating copy to clipboard operation
ktf copied to clipboard

Build issue with kernel 5.4

Open Mantra84 opened this issue 3 years ago • 3 comments

Hello,

While compiling kernel 5.4.125 with the latest KTF version (SHA-1 63c19dead80de9cd654b08120d28a04f24174f4b), I got the nla_strscpy implicit declaration error.

This issue should have been solved with the lines in ktf_compat.h (line 56):

#if (KERNEL_VERSION(5, 11, 0) > LINUX_VERSION_CODE) #define nla_strscpy nla_strlcpy #endif

But it seems that this branch is not entered.

I think the issue come form the first condition in ktf_compat.h (line 1):

#if (KERNEL_VERSION(5, 2, 0) > LINUX_VERSION_CODE)

Maybe this line should be change to:

--- a/kernel/ktf_compat.h +++ b/kernel/ktf_compat.h @@ -1,4 +1,4 @@ -#if (KERNEL_VERSION(5, 2, 0) > LINUX_VERSION_CODE) +#if (KERNEL_VERSION(5, 11, 0) > LINUX_VERSION_CODE)

What do you think about it ?

Thank you.

Mantra84 avatar Jul 20 '21 09:07 Mantra84

You are quite right. I I think I'll propose we just remove the other define to avoid making this mistake again in the future as more compat stuff is needed. Thanks for the report!

knuto avatar Jul 21 '21 16:07 knuto

I have updated knuto/ktf to fix the issue (pull request #26)

knuto avatar Jul 21 '21 16:07 knuto

Thanks for the fix :smile:

Mantra84 avatar Jul 22 '21 08:07 Mantra84