title: how to get kernel header file?
body: <p>i'm trying to make new system calls in kernel 2.6.21</p>
  
  <p>and one of the new system calls use 'sys_write' function, </p>
  
  <p>but to use this function, i realized that i must install kernel header file according to 2.6.21 version.</p>
  
  <p>but i can't find kernel header file(2.6.21)</p>
  
  <p>i tried <code>apt-get install linux-headers-'uname -r'</code> , <code>apt-cache search linux-headers-$(uname -r)</code></p>
  
  <p>but i can't find anything..</p>
  
  <pre><code>#include &lt;linux/kernel.h&gt;
  #include &lt;linux/init.h&gt;
  #include &lt;linux/module.h&gt;
  #include &lt;linux/syscalls.h&gt;
  #include &lt;linux/fcntl.h&gt;
  #include &lt;asm/uaccess.h&gt;
  
  int main(){
      int fd;
      int old_fs;
      old_fs = get_fs();
      set_fs(KERNEL_DS);
      fd = sys_open("config.txt", O_RDONLY, 0);
      if(fd &gt;= 0)
          sys_close(fd);
      set_fs(old_fs);
      return 0;
  }
  
  
  
   vv.c:2:24: error: linux/init.h: No such file or directory  
   vv.c:3:26: error: linux/module.h: No such file or directory  
   vv.c:4:28: error: linux/syscalls.h: No such file or directory  
   In file included from /usr/include/asm/fcntl.h:1,  
                   from /usr/include/linux/fcntl.h:4,  
                   from vv.c:5:  
   /usr/include/asm-generic/fcntl.h:120: error: expected specifier-qualifier-list before ‘off_t’  
   /usr/include/asm-generic/fcntl.h:143: error: expected specifier-qualifier-list before ‘loff_t’  
    vv.c:6:25: error: asm/uaccess.h: No such file or directory  
   vv.c: In function ‘main’:  
   vv.c:12: error: ‘KERNEL_DS’ undeclared (first use in this function)  
   vv.c:12: error: (Each undeclared identifier is reported only once  
   vv.c:12: error: for each function it appears in.)  
  </code></pre>
  
  <p>additionally, above header files is what i want to.</p>
  
  <p>how can i get the kernel header file?</p>
  
  <p>please help me..</p>