kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* internal / external include files
@ 2019-07-24  9:11 Martin Kaiser
  2019-07-24  9:21 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Kaiser @ 2019-07-24  9:11 UTC (permalink / raw)
  To: kernelnewbies

Dear all,

is it correct that the files under include/uapi/ can be included by a
user space application?

I just ran into an error where my application ended up including
include/uapi/linux/stddef.h (with a number of intermediate steps).

This fails because the kernel's stddef.h includes
include/linux/compiler_types.h and this file is internal to
the kernel.

What is the correct way to solve this? Should I fix my include path to
make sure that my application picks the stddef.h in the compiler's
sysroot rather than the kernel's stddef.h?

Or should include/uapi/linux/stddef.h guard the kernel-internal parts
using #ifdef __KERNEL__?

Thanks,
Martin

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-25  5:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24  9:11 internal / external include files Martin Kaiser
2019-07-24  9:21 ` Greg KH
2019-07-24 21:20   ` Martin Kaiser
2019-07-25  5:45     ` Re[3]: " Konstantin Andreev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).