title: sys/types.h: No such file or directory
body: <p>I am trying to compile module but get this error.    </p>
  
  <pre><code>fatal error: sys/types.h: No such file or directory
  compilation terminated.
  </code></pre>
  
  <p>Here is my module file headers </p>
  
  <pre><code>#include &lt;linux/init.h&gt;           // Macros used to mark up functions e.g. __init __exit
  #include &lt;linux/module.h&gt;         // Core header for loading LKMs into the kernel
  #include &lt;linux/device.h&gt;         // Header to support the kernel Driver Model
  #include &lt;linux/kernel.h&gt;         // Contains types, macros, functions for the kernel
  #include &lt;linux/fs.h&gt;             // Header for the Linux file system support
  #include &lt;asm/uaccess.h&gt;          // Required for the copy to user function
  #include &lt;sys/types.h&gt;
  </code></pre>
  
  <p>And my <code>Makefile</code>  </p>
  
  <pre><code>obj-m = test.o
  
  all:
      make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
  clean:
      make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
  </code></pre>
  
  <p>I have tried to search for this file   </p>
  
  <pre><code> find /usr/include -name types.h
  </code></pre>
  
  <p>Here are results    </p>
  
  <pre><code>/usr/include/sys/types.h
  /usr/include/libr/sdb/types.h
  /usr/include/rpc/types.h
  /usr/include/i386-linux-gnu/sys/types.h
  /usr/include/i386-linux-gnu/asm/types.h
  /usr/include/i386-linux-gnu/bits/types.h
  /usr/include/linux/iio/types.h
  /usr/include/linux/types.h
  /usr/include/x86_64-linux-gnu/sys/types.h
  /usr/include/x86_64-linux-gnu/asm/types.h
  /usr/include/x86_64-linux-gnu/bits/types.h
  /usr/include/asm-generic/types.h
  /usr/include/c++/5/parallel/types.h
  </code></pre>
  
  <p>I tried to set it as <code>#include "/usr/include/sys/types.h"</code>  </p>
  
  <p>but got following error   </p>
  
  <pre><code>/usr/include/sys/types.h:25:22: fatal error: features.h: No such file or directory
  compilation terminated.
  </code></pre>
  
  <p>I am using <code>Kali Linux(Debian)</code> AMD64 platform    </p>
  
  <pre><code>Linux kali 4.5.0-kali1-amd64 #1 SMP Debian 4.5.5-1kali1 (2016-06-06) x86_64 GNU/Linux
  </code></pre>
  
  <p>What is wrong ? Thanks</p>
  
  <p><strong>SOLVED</strong> </p>
  
  <p>Sorry this was my fault, I made a typo in type and tried to include <code>sys/types.h</code> file, but it was not required at all all types are declared in <code>/usr/src/linux-headers-4.5.0-kali1-common/include/linux/types.h</code> in my case. Thanks everyone.</p>