LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 10-30-2002, 02:25 AM   #1
pot_po
LQ Newbie
 
Registered: Oct 2002
Posts: 2

Rep: Reputation: 0
where to look for header files for kernel module


I saw at least two places which contains the header files I need for writing a kernel module ( linux/kernel.h and linux/module.h), which are

/usr/include
and /usr/src/linux-xxx/include (xxx is the kernel version)

seems the files they contain are quite different...sometimes my module only compiles with the header files from the second include path, (use -I to choose the include path).

Anyone knows the difference between these two paths and the their purpose?
 
Old 10-30-2002, 10:57 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,408

Rep: Reputation: 108Reputation: 108
It should be the same. Files from the directory with your kernel headers (/usr/src/linux-xxxx/include, for example) should be symlnked to /usr/include/linux. In many distros,files from /usr/include/linux are installed from package kernel-headers. When you install new kernel and compile it they're not changed to new ones...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What!? Kernel header files too old? LinuxLuvr Linux From Scratch 2 06-20-2005 08:43 AM
Kernel Header Files apocolpse Suse/Novell 3 11-19-2004 12:48 PM
Kernel Header Files? kholdstayr Slackware 1 12-22-2003 04:45 PM
What/where are kernel header files? Toker Linux - General 5 09-29-2003 11:16 PM
where are the kernel header files? vance Linux - Software 5 03-05-2002 01:51 AM


All times are GMT -5. The time now is 06:10 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration