Le mer. 30 oct. 2024 à 20:01, Yishai Jaffe via lists.yoctoproject.org <yishai1999=gmail....@lists.yoctoproject.org> a écrit :
> Hi Quentin, > > On Wed, Oct 30, 2024 at 5:01 PM Quentin Schulz <quentin.sch...@cherry.de> > wrote: > >> 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. >> >> > I think my question wasn't clear enough. > I meant to ask about the general usage of uapi header files. > When are definitions put in the uapi headers and when are they in the > regular linux headers? > The best explanation I could find when I hit this issue a few weeks ago is a stack overflow answer: https://stackoverflow.com/a/18858544 (+links inside) Does that help? > >> 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 (#64191): https://lists.yoctoproject.org/g/yocto/message/64191 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] -=-=-=-=-=-=-=-=-=-=-=-