Thread: Help Understanding User Include Linux Header Files After Kernel Upgrade

  1. #1
    Registered User
    Join Date
    Dec 2014
    Posts
    2

    Help Understanding User Include Linux Header Files After Kernel Upgrade

    Hello,

    I am trying to port a small Linux Kernel module and additional User Land Code originally built on Kali Linux with a 3.14 kernel to Debian Wheezy. I upgrade the Wheezy kernel to 3.14 and the kernel module seems fine but the user land component seems to not build correctly.

    To be more specific its the linux/netfilter/nf_nat.h file which the program cannot find. I am just wondering from a general stand point, now that I have updated the Debian Linux Kernel from 3.2 to 3.14 how can I update the user land include files? Or is there a better way of getting this stuff to work?

    Thanks,

    Joe

  2. #2
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Install the linux-headers package.
    (And iirc, with the new kernels, you have to build the kernel on your machine at least once to invoke the out of tree module makefile in its context)

  3. #3
    Registered User
    Join Date
    Dec 2014
    Posts
    2
    Thanks for your help manasij7479,
    When I originally compiled the new kernel I used make-kpkg and I also built custom header-files into a deb package and I installed those kernel header files. When I try to install the linux-headers package as you suggested it seems it is already up to date. It appears linux-headers package install kernel headers and not the /usr/include headers?

    I am really just trying to update the /usr/include files and associated C files so that it more resembles kali linux 3.14 kernel so that I can compile my C programs. As far as I can tell the linux kernel files are up to date using 3.14 kernel but everything else is still from the original Debian wheezy. Perhaps you have more suggestions?

    Thanks again, I am not a C developer and I am not very experienced with Linux so any suggestions or comments are really appreciated.

    Joe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. where to include header files?
    By kaos_frack in forum C++ Programming
    Replies: 6
    Last Post: 12-30-2008, 03:09 PM
  2. Including kernel header files
    By carmaa in forum C Programming
    Replies: 0
    Last Post: 02-03-2008, 03:43 PM
  3. Header to include for scripting in linux C/C++ programs
    By Loctan in forum C++ Programming
    Replies: 2
    Last Post: 09-21-2005, 07:37 AM
  4. include library header in header files
    By Raison in forum C++ Programming
    Replies: 6
    Last Post: 09-27-2004, 02:50 AM
  5. Necessary to include header files?
    By Nutshell in forum C Programming
    Replies: 5
    Last Post: 01-22-2002, 04:16 AM