Hi Yishai,

On 10/30/24 3:54 PM, Yishai Jaffe via Lists.Yoctoproject.Org wrote:
You don't often get email from yishai1999=gmail....@lists.yoctoproject.org. Learn why 
this is important<https://aka.ms/LearnAboutSenderIdentification>
Thanks Quentin,
Changing the include to uapi/linux/sched/types.h solved the issue.
But just so I'm clear on this - Can you explain when I should use uapi headers 
vs when to use the regular linux/xxx headers?


You should include the header where the structure is defined.

The "issue" in Yocto is that the headers aren't coming from your kernel sources but from a generic linux kernel header recipe, and this is made on purpose. The generic linux kernel header recipe is at 6.6 in Scarthgap. Styhead has 6.10. The structure is defined in a different header in 6.6 and in 6.7+ (including 6.10), so your out-of-tree module needs the path from 6.6 in order to compile in Scarthgap, but will need another path from 6.7+ in order to compile in Styhead.

You can handle that via #if in your code, if you need the exact same source code to build on different Yocto/kernel versions. That is the cross to bear when one develops out of tree kernel modules sadly.

Cheers,
Quentin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64185): https://lists.yoctoproject.org/g/yocto/message/64185
Mute This Topic: https://lists.yoctoproject.org/mt/109295266/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to