Until someone gets off their butt and assembles a set of userspace kernel headers, the correct answer is "don't include kernelheaders, instead make private copies of the needed kernel definesand structs and fixup the kernel types to use C99 types fromstdint.h"