internal / external include files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux