I noticed that while Gentoo offers the development kernel there is header ebuild of this kernel, thus compiling stuff that relies on the headers being in place will often fail.. I would be nice if there was a generic metode of linking the /usr/src/linux dir to /usr/include or simply ebuilds for the development kernels as well.
the linux kernel-specific include files and directories in /usr/include are the ones for the version of the linux kernel that was run when glibc was built. the /usr/src/linux symlink is really awful and needs to die. what i did was make /usr/include-old directory and move the following from /usr/include/* there.... asm linux net scsi sound then from the 2.5.x development sources /usr/src/yourkernelversion-2.5.something/include you'll want to copy (cp -a) the following to /usr/include/ .... asm linux net scsi sound asm-generic hope this helps!
For most kernel ebuilds, you can just change ETYPE to "headers" in the file and that kernel version will be installed as headers [ if that was the problem ]. /usr/include serves a global include directory [not just for the linux kernel] but the /usr/include/linux includes should be the ones you used to compile glibc with to avoid incompatibility problems when building kernel-reliant applications.