Why do I get can find linux/stat.h or some other header file?
You have not installed the Linux Kernel Source from the Linux installation CD-ROM (or downloaded this from internet). Any Linux installation requires the kernel source code (and therefore header files) be loaded on the system before the C compiler will work correctly. The Linux kernel source code files are a standard Linux package and should be loaded via the standard method for your version of Linux. Please consult your Linux documentation for more details on this.