LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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
 
Search this Thread
Old 07-12-2011, 09:12 AM   #1
goossen
Member
 
Registered: May 2006
Location: Bayern, Germany
Distribution: Many
Posts: 224

Rep: Reputation: 41
Which version.h is being used ?


I have a machine which came with the kernel 2.6.18, I've compiled from source a newer kernel (2.6.35) because the patches I'm working on are intended for that version.
I have several of lines like this:
Code:
#include <linux/version.h>
and
Code:
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
These values are defined in version.h but how can I tell to (or know if it) use /opt/kernel/linux-2.6.35/include/linux/version.h instead of /usr/include/linux.version.h (which is 2.6.18) ?

Or am I missing some step related to kernel upgrade ?
 
Old 07-12-2011, 01:16 PM   #2
CapnStank
Member
 
Registered: Oct 2009
Distribution: Fedora, HPUX
Posts: 31

Rep: Reputation: 2
See this post. Basically the .h file located first in your include path is used.

I *believe* you can use `gcc -v` to see your include path but I forget and don't have access to gcc compiler where I am right now.
 
Old 07-13-2011, 06:57 AM   #3
Peverel
Member
 
Registered: May 2009
Location: Chelmsford, England
Distribution: OpenSuse 11.3, 11.4 and 12.2
Posts: 98

Rep: Reputation: 21
I suggest you read the file \usr\include\linux\version.h ; it appears to tell you what to do.
 
  


Reply

Tags
driver, kernel


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 03:54 PM
Xfree Error (EE) module ABI minor version (7) is newer than the server's version (6) jimdaworm Slackware 0 10-17-2003 06:26 PM
Xfree prob radeon.o kernel module version is 1.1.1 but version 1.5.0 or newer needed. jimdaworm Slackware 0 10-01-2003 07:27 PM


All times are GMT -5. The time now is 01:16 PM.

Main Menu
Advertisement
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 Google+: linuxquestions
Open Source Consulting | Domain Registration