It might be cleaner if the kernel include files and the /usr/include
include files both included a set of common include files. That gets
rid of all the #ifdef mess for good. The separation would keep the
problems from creeping back in.
Maybe change to having /usr/src/linux/include/private and
/usr/src/linux/include/public, with /usr/include/linux as a
symlink to /usr/src/linux/public. Get rid of /usr/src/include/linux
to catch mistakes. (something like that, my Linux box is at home)